Install Nginx 1.10.0 (Web Server) on Linux

NGINX stands for engine-x is a free, open-source, high-performance HTTP server and reverse proxy, as well as an mail (IMAP/POP3) proxy server. Nginx is known for its high performance, stability, rich feature set, simple configuration, and low resource consumption. Currently 146 million websites use NGINX to deliver super-fast web experiences. The big companies like (WordPress, facebook, GitHub & cloudflare, etc..) using nginx. Also read about Self signed certificate (SSL) installation on Nginx, Setup Nginx Server Blocks (Virtual Hosts) on Nginx & Enable HTTP/2.0 support on Nginx. The latest version of Nginx 1.10.0 released on April 26, 2016. Nginx Download Link & Nginx Repo Link.

1) Add Nginx Repo to CentOS

Add EPEL Repo & Create the file /etc/yum.repos.d/nginx.repo and Add the below content for CentOS based on your OS Version and Install Nginx.

[Adding Nginx Repo to CentOS 6 & 7]
# nano /etc/yum.repos.d/nginx.repo
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/mainline/centos/$releasever/$basearch/
gpgcheck=0
enabled=1

[Import the Nginx Signature]
# wget http://nginx.org/keys/nginx_signing.key
# rpm --import nginx_signing.key

[Install Nginx]
# yum install nginx

2) Add Nginx Repo to RHEL

Create the file /etc/yum.repos.d/nginx.repo and Add the below content for RHEL based on your OS Version.

[Adding Nginx Repo to RHEL 6 & 7]
# nano /etc/yum.repos.d/nginx.repo
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/mainline/rhel/$releasever/$basearch/
gpgcheck=1
enabled=1

[Import the Nginx Signature]
# wget http://nginx.org/keys/nginx_signing.key
# rpm --import nginx_signing.key

[Install Nginx]
# yum install nginx

3) Add Nginx Repo to Ubuntu

Add Nginx repo to Ubuntu systems.

$ sudo sh -c "echo 'deb http://nginx.org/packages/ubuntu/ `lsb_release -cs` nginx' >> /etc/apt/sources.list"
$ sudo sh -c "echo 'deb-src http://nginx.org/packages/ubuntu/ `lsb_release -cs` nginx' >> /etc/apt/sources.list"
$ curl http://nginx.org/keys/nginx_signing.key | apt-key add -
$ sudo apt-get update
$ sudo apt-get install nginx

Magesh Maruthamuthu

Love to play with all Linux distribution

You may also like...