How To Install nginx

by Ranganathan 2014-02-28 17:05:34

Step1:The following script save in nginx.sh or any name



#! /bin/bash

cd /root

echo "--> Updating zlib,pcre-devel,gcc-c++";

yum install zlib*

yum install pcre-devel

yum install gcc-c++


echo "--> download ngnix file";

wget http://nginx.org/download/nginx-1.0.5.tar.gz

tar zxvf nginx-1.0.5.tar.gz

cd nginx-1.0.5

./configure --prefix=/usr/local/nginx

make

make install

/usr/local/nginx/sbin/nginx

#netstat -anp | grep nginx

echo "--> ngnix installation completed.......";

cd /root


step2: Run nginx.sh file using following command

sh nginx.sh


step3: Finally check nginx installation use following command

netstat -anp | grep nginx





1101
like
0
dislike
0
mail
flag

You must LOGIN to add comments