How to Install Nginx on VPS CentOS 6 and 7

0
300

In fact, Nginx is pronounced with an “Engine-X” instead of “nging” However I still love to pronounce it with Nging. Nginx is an Open Source reverse proxy server for HTTP, HTTPS, SMTP, POP3 and IMAP Protocols, as well as load balancing or load balancer, HTTP cache and the Web Server. Nginx project starts with a strong focus on high concurrency, high performance and low memory usage.

Install Nginx Centos 6

Tutorial how to Install Nginx on CentOS 6 and 7

1. Add Epel Repository

Because nginx is not available in the repository on CentOS 6 then we’ll add the repo from epel. Here’s how to add the epel repository, with customized versions of centOS that are used:

RHEL/CentOS 6 32-Bit

# wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
# rpm -ivh epel-release-6-8.noarch.rpm

For RHEL/CentOS 6 64-Bit

# wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
# rpm -ivh epel-release-6-8.noarch.rpm

2. Remove HTTPD

On Linux CentOS 6 defaults already installed httpd server, but we will use nginx to it remove httpd so as not to clash with nginx

# yum remove httpd

If there is a question of type y then enter.

3. Install Nginx

# yum install nginx -y

4. Start Nginx

# service nginx start

Note: Once that is done make sure nginx active when the system reboots

# chkconfig–levels 235 nginx on

5. finish

Open the broswer type your VPS IP, if successful will be no writing of nginx.

NO COMMENTS

LEAVE A REPLY