22 C
Texas
angeloma
Senior Writer and partner

How to install Nginx on OpenSUSE 15. 2 / 15.1?

OpenSUSE is one of the most outstanding operating systems in the world of Linux for being very stable. Its stability and popularity come from being the community distribution of SUSE that is so well positioned. This company collaborates and sponsors many projects related to open source providing professional support. So, I could say that it competes with RHEL or Canonical but with new technologies. Therefore, it is not surprising that it is chosen by many sysadmins as a system where to deploy their applications. In this post, you will learn how to install Nginx on OpenSUSE 15.2

Nginx is one of the most popular Open Source services in the world. It is a web server that stands out for being high-performance and providing an ability to handle many requests on one server. In addition, Nginx has recently been purchased by F5 Networks to continue a growth process.

All in all, it is easy to deduce that OpenSUSE or SUSE are privileged options for running network services. So today I will show you how to install Nginx on OpenSUSE 15.2 or SUSE 15. This way you can enjoy a great web server in a great Linux distribution.

1. Upgrade the system

As always we recommend doing a general update to the system. With this, you will be more stable and ready to start the process.

- Advertisement -
:~$ sudo zypper up

1.- Upgrade the system
1.- Upgrade the system

The result will be that your system will have the latest security patches installed. So it will be safer and more protected against cybercrime.

2. Install Nginx on OpenSUSE 15.2

Nginx is available in the OpenSUSE and SUSE repositories. This is a great advantage to increase the ease of installation. On the other hand, we will not always have the latest versions.

So, first, search for Nginx using Zypper.

:~$ sudo zypper search nginx

2.- Nginx related package
2.- Nginx related package

As you can see, there are several packages related to Nginx within the official repositories of the distribution. However, the nginx package is the one you need to install the web server.

:~$ sudo zypper in nginx

3.- Install Nginx on OpenSUSE / SUSE
3.- Install Nginx on OpenSUSE / SUSE

Then, it is a good idea to enable the Nginx service to run as soon as the system starts.

:~$ sudo systemctl enable nginx

After that, start the service.

:~$ sudo systemctl start nginx

If you want to see the status of the Nginx service, you can use the following command:

:~$ sudo sytemctl status nginx

4.- The Nginx service
4.- The Nginx service

Now, it is time to test it.

3. Test Nginx on OpenSUSE

The next step is to check that Nginx is running correctly. To do this, you need to make an HTML file and place it in the root directory of Nginx in OpenSUSE / SUSE.

So, use nano to do it.

:~$ sudo nano /srv/www/htdocs/index.html

Add the following:

<html>
<body>
<h1>Welcome to osradar </h1>
</body>
</html>

5.- Test nginx
5.- Test nginx

Save the file and close it.

Then, make some changes to the firewall settings to allow the HTTP service:

:~$ sudo firewall-cmd --add-port=80/tcp --permanent
:~$ sudo firewall-cmd --reload

6.- Firewall settings
6.- Firewall settings

Now, open your favorite web browser like Firefox or Chrome and go to http://SERVER_IP/ and you will see this.

7.- Welcome to osradar
7.- Welcome to osradar

So, Nginx is working.

Conclusion

OpenSUSE and SUSE have been characterized by fairly professional distributions that behave excellently on a server. However, they do this without sacrificing the power and robustness that Linux offers.

In this tutorial, you have learned how to install Nginx on OpenSUSE 15.2 / SUSE 15 and it is the gateway to great things with this distribution.

Please, share this post with your friends.

You can also read:

OpenSUSE 15.1 is available!!

- Advertisement -
Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"

LEAVE A REPLY

Please enter your comment!
Please enter your name here



Latest article