×


How to Install Nginx Mainline on openSUSE Leap ?

Nginx is a high-performance web server and reverse proxy. Nginx Mainline is the development branch of Nginx, which contains the latest features and bug fixes. 

Here at Ibmi Media, We will guide you through the process of installing Nginx Mainline on openSUSE Leap.


Prerequisites:

  • An openSUSE Leap installation
  • Root access to the server


Let's get started;


1. Update openSUSE Leap

Before installing Nginx, it is recommended to update the openSUSE Leap installation. This can be done by running the following command:

# zypper update


2. Import nginx.org Repository

In order to install Nginx Mainline on openSUSE Leap, we need to import the nginx.org repository. This can be done by running the following command:

# zypper addrepo http://nginx.org/packages/mainline/opensuse/<distro> nginx

Replace <distro> with the openSUSE Leap version you are using (e.g. 42.3).


3. Install Dependecies

Nginx depends on some packages that need to be installed before we can install Nginx itself. Run the following command to install the necessary dependencies:

# zypper install libpcre3-devel gcc make openssl-devel


4. Import NGINX Mainline Repository

Now we need to import the Nginx Mainline repository. This can be done by running the following command:

# zypper addrepo http://nginx.org/packages/mainline/opensuse/<distro> nginx-mainline

Replace <distro> with the openSUSE Leap version you are using (e.g. 42.3).


5. Import Nginx Stable Repository

In addition to the Nginx Mainline repository, we also need to import the Nginx Stable repository. This can be done by running the following command:

# zypper addrepo http://nginx.org/packages/stable/opensuse/<distro> nginx-stable

Replace <distro> with the openSUSE Leap version you are using (e.g. 42.3).


6. Import GPG Key

For security purposes, we need to import the Nginx GPG key. This can be done by running the following command:

# rpm --import http://nginx.org/keys/nginx_signing.key


7. Install Nginx

Now we can install Nginx. Run the following command to install Nginx Mainline:

# zypper install -t nginx-mainline

Or run the following command to install Nginx Stable:

# zypper install -t nginx-stable

Once the installation is complete, you can start using Nginx.


[Need Linux System issues fix ? We are available. ]


Conclusion

This article covers how we successfully installed Nginx Mainline on openSUSE Leap.