Skip to content →

Installing Nginx on CentOS

Step 6, 7 & 8 are entirely optional
1) sudo yum install pcre-devel zlib-devel openssl-devel
2) mkdir ~/sources
3) cd ~/sources
4) wget http://nginx.org/download/nginx-0.9.5.tar.gz
5) tar -zxvf nginx-0.9.5.tar.gz
6) mv nginx-0.9.5.tar.gz nginx
7) cd nginx
8) [if gcc not available] yum install gcc
9) ./configure –sbin-path=/sbin/nginx –conf-path=/usr/local/nginx/nginx.conf –pid-path=/usr/local/nginx/nginx.pid –with-http_ssl_module –with-md5=auto/lib/sha1
10) make
11) make install
12) cd /usr/local/nginx/
13) vi nginx.conf
14) nginx

Published in Umum