1 说明
- 以下全部操作均已
root
用户执行
2 添加nginx的源
rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
3 安装Nginx
yum install -y nginx
安装成功后,配置文件目录为/etc/nginx
4 启动Nginx
systemctl start nginx.service #启动Nginx
systemctl enable nginx.service #设置开机自启