steps
-
add nginx repo
-
create /etc/yum.repos.d/nginx.repo
# method 1 $ nano /etc/yum.repos.d/nginx.repo [nginx] name=nginx repo baseurl=http://nginx.org/packages/centos/$releasever/$basearch/ gpgcheck=0 enabled=1 # method 2 echo -e "[nginx]\nname=nginx repo\nbaseurl=http://nginx.org/packages/centos/\$releasever/\$basearch\nenabled=1\ngpgcheck=0" > /etc/yum.repos.d/nginx.repo
-
install after nginx repo setup
$ yum install nginx
-
-
config
-
auto start and shutdow
$ chkconfig nginx on
-
config file
# reverse proxy $ nano /etc/nginx/nginx.conf
-
start
$ /etc/init.d/nginx start ... $ ifconfig eth0 | grep inet | awk '{ print $2 }'
-