centos6中安装nginx,如下:
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