Getting up and running with Nginx [CentOS]

August 14th, 2012
143 words · 1 minutes read · 0 Comments

While I’m on the topic of upgrading and installing server software, why not go quickly into how I get nginx set up on my centOS boxes.

It’s a super simple process as there’s an official RHEL/centOS nginx yum repository.

Basically, given a new server I would remove apache/httpd with

yum remove httpd

Then create a file named /etc/yum.repos.d/nginx.repo and paste the configuration below within it:

1
2
3
4
5
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
gpgcheck=0
enabled=1


Then it’s a simply matter of running

1
2
3
yum -y install nginx
chkconfig nginx on
service nginx start

And hey presto, your shiny new web server should be all up and running.

For the full install guide, check out http://wiki.nginx.org/Install


Posted in: Tech
Tagged: CentOS, linux, nginx, server
Originally published at: http://texh.net/blog/getting-up-and-running-with-nginx

Leave a comment