1.添加CentOS 7 Nginx yum资源库
sudo rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
2.安装Nginx
sudo yum install -y nginx
3.启动Nginx
sudo systemctl start nginx.service
4.开机启动Nginx
sudo systemctl enable nginx.service
5.Nginx配置信息
网站文件存放默认目录 /usr/share/nginx/html
网站默认站点配置 /etc/nginx/conf.d/default.conf
自定义Nginx站点配置文件存放目录 /etc/nginx/conf.d/
Nginx全局配置 /etc/nginx/nginx.conf
Nginx启动 nginx -c nginx.conf