Howto install Nginx on Centos

Dec-13th-2010

Today we are going to install Nginx on Centos. Nginx (pronounced “Engine X”) is a lightweight web server that offers speed and flexibility without all of the extra features that larger web servers like Apache offer. Although it is a free and open source application, CentOS does not offer the latest version in its default YUM repository. To install it, you need to add the EPEL (Extra Packages for Enterprise Linux) repository, which is part of the Fedora Project.

Installing the EPEL repository:-

[map007@linuxbox ~]# rpm -Uvh http://download.fedora.redhat.com/pub/epel/5Server/i386/epel-release-5-4.noarch.rpm

Retrieving http://download.fedora.redhat.com/pub/epel/5Server/i386/epel-release-5-4.noarch.rpm
warning: /var/tmp/rpm-xfer.toDVXj: Header V3 DSA signature: NOKEY, key ID 217521f6
Preparing…                ########################################### [100%]
1:epel-release              ########################################### [100%]

Install nginx:-

[map007@linuxbox ~]# yum install nginx

It will install nginx and ask gpg-key for EPEL, accept with yes option.

Now start your nginx web server.

[map007@linuxbox ~]# service nginx start

Starting nginx:                                            [  OK  ]

The default document root of nginx server :- /usr/share/nginx/html
And the config file path is :-  /etc/nginx/nginx.conf

Now open your browser and type 127.0.0.1 , it will open your default nginx page like below:-

http://127.0.0.1

=================================================================

Enjoy Linux !!!

Mega World News Facebook Twitter Myspace Friendfeed Technorati del.icio.us Digg Google Yahoo Buzz StumbleUpon Weekend Joy

Add A Comment

*