centos6 yum安装nginx

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了centos6 yum安装nginx相关的知识,希望对你有一定的参考价值。



centos6 yum安装nginx


[[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



技术分享


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

以上是关于centos6 yum安装nginx的主要内容,如果未能解决你的问题,请参考以下文章

使用最新的yum在CentOS6.5上安装nginx时的目录问题

CentOS6.5 编译安装Nginx

centos6.5编译安装nginx[整理二]

CentOs6.x安装nginx1.2.1

centos6.5安装Nginx

基于CentOS6.5环境之下的LNMP之编译安装Nginx1.8.0 stable(稳定版)