1、官网下载http://nginx.org/en/download.html
2、Pre-Built Linux Packages for Stable
To enable automatic updates of Linux packages set up the yum repository for the RHEL/CentOS distributions, or the apt repository for the Debian/Ubuntu distributions.
To set up the yum repository for RHEL/CentOS, choose the corresponding
nginx-release
package from the list:
#rpm -ivh nginx-release-centos-6-0.el6.ngx.noarch.rpm
3、This package contains yum configuration file and a public PGP key necessary to authenticate signed RPMs. Download and install it, then run the following:
yum install nginx
4、1 配置所在目录:/etc/nginx/
2 PID目录:/var/run/nginx.pid
3 错误日志:/var/log/nginx/error.log
4、1 配置所在目录:/etc/nginx/
2 PID目录:/var/run/nginx.pid
3 错误日志:/var/log/nginx/error.log
命令:
1 启动:nginx
2 重启:killall -HUPnginx
3 测试配置:nginx –t
2 重启:killall -HUPnginx
3 测试配置:nginx –t
本文转自 lcpljc 51CTO博客,原文链接:http://blog.51cto.com/lcpljc/1153227,如需转载请自行联系原作者