[Linux] - CentOS 安装nginx
linux版本:CentOS 6.0+
1、下载nginx rpm包命令
wget http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm
2、安装nginx rpm包
rpm -ivh nginx-release-centos-6-0.el6.ngx.noarch.rpm
3、使用yum安装nginx
yum install nginx
4、nginx命令
启动
nginx
关闭
nginx -s stop
5、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
nginx默认配置文件在: /etc/nginx/conf.d/default.conf