1.加载nginx源
rpm -ivh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
2.安装
yum install nginx
3.查看安装的nginx默认目录
whereis nginx
(1) Nginx配置路径:/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
4.相关命令
nginx 启动
nginx -t 测试命令
nginx -s relaod 修改nginx.conf之后,可以重载
5.查看nginx进程
ps -ef | grep nginx
(说明启动成功)