首页 > 代码库 > centos6 yum安装nginx

centos6 yum安装nginx



centos6 yum安装nginx


[root@client ~]#rpm -ivh http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm

[root@client ~]#yum info nginx

[root@client ~]#yum install nginx


[root@client ~]# service nginx start

Starting nginx:                                            [  OK  ]

[root@client ~]# netstat -lnptu |grep 80

tcp        0      0 0.0.0.0:80                  0.0.0.0:*                   LISTEN      6023/nginx


[root@client ~]#chkconfig nginx on

[root@client ~]# vim /etc/nginx/nginx.conf


[root@client ~]# /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



技术分享


本文出自 “比尔linux运维笔记” 博客,请务必保留此出处http://chenshoubiao.blog.51cto.com/6159058/1884915

centos6 yum安装nginx