更新yum源文件:
rpm -ivh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
安装Nginx:
yum -y install nginx
操作命令:
systemctl start nginx; #启动Nginx systemctl stop nginx; #停止Nginx
默认配置文件位置:
/etc/nginx
