1.# wget http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm
2.# rpm -ivh nginx-release-centos-6-0.el6.ngx.noarch.rpm
3.# 安裝過程會提示錯誤可以不必理會(warning: nginx-release-centos-6-0.el6.ngx.noarch.rpm: Header V4 RSA/SHA1 Signature, key ID 7bd9bf62: NOKEY)
4.# yum install nginx
5. 安裝成功的話提示: Complete
nginx默認目錄
1 配置所在目錄:/etc/nginx/
2 PID目錄:/var/run/nginx.pid
3 錯誤日志:/var/log/nginx/error.log
4 訪問日志:/var/log/nginx/access.log
5 默認站點目錄:/usr/share/nginx/html
nginx 常用命令
1 啟動nginx:nginx
2 重啟nginx:killall -HUP nginx
3 測試nginx配置:nginx -t