Installing this ultrafast web server into your QuickWeb VPS is quite easy, just follow this step by step instructions below:
To install Nginx using yum we will need to include the EPEL repository.
Let's begin by installing the EPEL repository:
sudo rpm -Uvh http://download.fedora.redhat.com/pub/epel/5Server/
x86_64/epel-release-5-4.noarch.rpm
Now, Install nginx using Yum :)
sudo yum install nginx
As this will be the first package we install using EPEL, we will be asked to import the EPEL
gpg-key. This key is used to sign all packages that are associated with the EPEL repository
to verify their validity. Once the gpg-key has been imported, the installation should
proceed as expected. This will install any dependencies that Nginx requires.
Thats it! Start Nginx
sudo /etc/init.d/nginx start
Now simply navigate to your IP address. You can get the IP address of the server by issuing
the below command
hostname -i
Â
Confirm the successful installation by accessing the server IP address in the browser and you will see the following welcome screen:
Â
As you would imagine when installing an application with the yum package manager, all init scripts have been
created.
However, we need to set up Nginx to start automatically if the slice is rebooted:
sudo /sbin/chkconfig nginx on
Controlling nginx is done with these commands:
sudo /etc/init.d/nginx start
sudo /etc/init.d/nginx stop
sudo /etc/init.d/nginx reload
sudo /etc/init.d/nginx restart
You can also check the current status as well as the configuration syntax by using the following commands:
sudo /etc/init.d/nginx status
sudo /etc/init.d/nginx configtest
The configtest option is particularly useful for testing your Nginx configuration before actually implementing it with
a reload or restart.
That's it.