About Nginx

Nginx is a HTTP server software like apache, lighter and more adaptable for functions such as HTTP Cache, proxies and load balancing, as a result of its flexibility.

Setting up Nginx

To get up and running, we will need the following prerequisites :

» A linux server plan having CentOS 7

» A non-root user having sudo privileges to gain admin rights.

You can set up Nginx by directly installing its rpm package or install its binary packages from its yum repository.

The packages contain a public PGP key needed to authenticate signed RPMs along with a yum config file. The first step involves setting up yum's default repository, to have the up to date version of nginx.

This is done through EPEL (Extra Packages for Enterprise Linux ) installation on CentOS.

To install EPEL, launch a terminal and type :

 sudo yum install epel-release 

Step 1: installing Nginx

The next step, would be to actually install Nginx.

Launch a terminal and type :

 sudo yum install nginx 

During the installation, you will be prompted to respond with yes, twice, to import th EPEL gpg-key and then to complete the installation.

Step 2: Start Nginx

Nginx doesn't start by default. To get it up, type.

 sudo /etc/init.d/nginx start 

To confirm the installation is complete, launch a browser and typr your linux server's ip address. If you dont know the address use the ifconfig command to get it, from your linux shell.

 ifconfig eth0 | grep inet | awk '{ print $2 }'  

On your browser page , you will see the words, "Welcome to nginx"

That is it! You now have nginx up and running.

Phanerus Banner