Nginx:linux Packages
Currently, Nginx packages is available for the following distributions and versions:
Rhel/centos:
Version |
Supported platforms |
5.x |
x86_64, i386 |
6.x |
x86_64, i386 |
9.6 |
x86_64 |
Debian:
Version |
Codename |
Supported platforms |
9.6 |
Wheezy |
x86_64, i386 |
8.x |
Jessie |
x86_64, i386 |
Ubuntu:
Version |
Codename |
Supported platforms |
12.04 |
Precise |
x86_64, i386 |
14.04 |
Trusty |
x86_64, i386, aarch64/arm64 |
15.10 |
Wily |
x86_64, i386 |
16.04 |
Xenial |
x86_64, i386 |
Sles:
Version |
Supported platforms |
12 |
x86_64 |
To enable Automatic updates of Linux packages set up the Yum repository for the Rhel/centos distributions, the APT reposit Ory for the Debian/ubuntu distributions, or the Zypper repository for SLES.
Pre-built Packages for Stable version
To set up the Yum repository for Rhel/centos, create the file named with the /etc/yum.repos.d/nginx.repo
following contents:
[Nginx]name=nginx repobaseurl=http://nginx.org/packages/os/osrelease/$basearch/gpgcheck=0enabled=1
Replace "with OS
" " rhel
or" centos
", depending on the distribution used, and" "with" "," " OSRELEASE
5
6
, or" 7
" , for 5.x, 6.x, or 7.x versions, respectively.
For Debian/ubuntu, on order to authenticate the Nginx repository signature and to eliminate warnings about missing PGP key During installation of the Nginx package, it's necessary to add the key used to sign the Nginx packages and repository T o The program apt
keyring. Downloadthis key from our web site, and add it to the program apt
keyring with the following command:
sudo apt-key add Nginx_signing.key
For Debian replace codename with Debian distribution codename, and append the following to the end of the /etc/apt/sources.list
F Ile
codename codename Nginx
For Ubuntu replace codename with Ubuntu distribution codename, and append the following to the end of the /etc/apt/sources.list
F Ile
codename codename Nginx
For Debian/ubuntu then run the following commands:
Apt-get Updateapt-get Install Nginx
For SLES run the following command:
Zypper addrepo-g-T yum-c ' HTTP://NGINX.ORG/PACKAGES/SLES/12 ' Nginx
Pre-built Packages for Mainline version
To set up the Yum repository for Rhel/centos, create the file named with the /etc/yum.repos.d/nginx.repo
following contents:
[Nginx]name=nginx repobaseurl=http://nginx.org/packages/mainline/os/osrelease/$basearch/gpgcheck=0enabled=1
Replace "with OS
" " rhel
or" centos
", depending on the distribution used, and" "with" "," " OSRELEASE
5
6
, or" 7
" , for 5.x, 6.x, or 7.x versions, respectively.
For Debian/ubuntu, on order to authenticate the Nginx repository signature and to eliminate warnings about missing PGP key During installation of the Nginx package, it's necessary to add the key used to sign the Nginx packages and repository T o The program apt
keyring. Downloadthis key from our web site, and add it to the program apt
keyring with the following command:
sudo apt-key add Nginx_signing.key
For Debian replace codename with Debian distribution codename, and append the following to the end of the /etc/apt/sources.list
F Ile
codename codename Nginx
For Ubuntu replace codename with Ubuntu distribution codename, and append the following to the end of the /etc/apt/sources.list
F Ile
codename codename Nginx
For Debian/ubuntu then run the following commands:
Apt-get Updateapt-get Install Nginx
For SLES run the following command:
Zypper addrepo-g-T yum-c ' HTTP://NGINX.ORG/PACKAGES/MAINLINE/SLES/12 ' Nginx
Configure Arguments
Configure arguments common for nginx binaries from pre-built packages:
--prefix=/etc/nginx--sbin-path=/usr/sbin/nginx--conf-path=/etc/nginx/nginx.conf--error-log-path=/var/log/nginx /error.log--http-log-path=/var/log/nginx/access.log--pid-path=/var/run/nginx.pid--lock-path=/var/run/ nginx.lock--http-client-body-temp-path=/var/cache/nginx/client_temp--http-proxy-temp-path=/var/cache/nginx/ Proxy_temp--http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp--http-uwsgi-temp-path=/var/cache/nginx/uwsgi_ Temp--http-scgi-temp-path=/var/cache/nginx/scgi_temp--user=nginx--group=nginx--with-http_ssl_module--with-http _realip_module--with-http_addition_module--with-http_sub_module--with-http_dav_module--with-http_flv_ Module--with-http_mp4_module--with-http_gunzip_module--with-http_gzip_static_module--with-http_random_index_ Module--with-http_secure_link_module--with-http_stub_status_module--with-http_auth_request_ Module--with-threads--with-stream--with-stream_ssl_module--with-http_slice_module--with-mail--with-mail_ssl_ Module--with-file-aio--with-http_v2_module--with-ipv6
Main Nginx package are built with all modules, that does not require additional libraries to avoid extra dependencies.
Dynamic Modules
Since version 1.9.11, Nginx supports dynamic modules. Currently, the following modules is built as dynamic and shipped as separate packages:
Nginx-module-geoipnginx-module-image-filternginx-module-njsnginx-module-perlnginx-module-xslt
Signatures
Both RPM Packages and Debian/ubuntu repositories use digital signatures to verify the integrity and origin of the download Ed package. In order to check a signature it was necessary to Downloadnginx signing key and import it to the rpm
or program apt
' s K Eyring
- On Debian/ubuntu:
sudo apt-key add Nginx_signing.key
- On Rhel/centos:
sudo rpm--import Nginx_signing.key
- On SLES:
sudo rpm--import Nginx_signing.key
On Debian/ubuntu/sles signatures was checked by default, and on Rhel/centos it was necessary to set
Gpgcheck=1
In the /etc/yum.repos.d/nginx.repo
file.
Since our PGP keys and packages is located on the same server, they is equally trusted. It is highly advised to additionally verify the authenticity of the downloaded PGP key. PGP have the "Web of Trust" concept, when a key was signed by someone else's key, that's in turn was signed by another key and So on. It often makes possible to build a chain from an arbitrary key to someone ' s key who you know and trust personally, thus ve Rify the authenticity of the first key in a chain. This concept was described in the details in GPG Mini Howto. Our keys has enough signatures, and their authenticity is relatively easy to check.
Nginx Installation Tutorial