CentOS 6下yum安装nginx
1.root登陆后安装
wget http://yun.boluo.org/linux/nginx-release-centos-6-0.el6.ngx.noarch.rpm
rpm -ivh nginx-release-centos-6-0.el6.ngx.noarch.rpm
yum install nginx
2.nginx的几个默认目录
whereis nginx
nginx: /usr/sbin/nginx /etc/nginx /usr/share/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
3.常用命令
1 启动nginx:nginx
2 重启nginx:killall -HUP nginx
3 测试nginx配置:nginx -t
本文出自 蓝鹰博客,转载时请注明出处及相应链接。
本文永久链接: http://www.lanyingblog.com/blog/2040.html