[[email protected] ~]#rpm -ivh http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm
[[email protected] ~]#yum info nginx
[[email protected] ~]#yum install nginx
[[email protected] ~]# service nginx start
Starting nginx: [ OK ]
[[email protected] ~]# netstat -lnptu |grep 80
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 6023/nginx
[[email protected] ~]#chkconfig nginx on
[[email protected] ~]# vim /etc/nginx/nginx.conf
[[email protected] ~]# /etc/init.d/nginx configtest
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
时间: 2024-10-24 08:33:30