在Linux下安装 nginx
1下载对应当前系统版本的nginx包(package)
wget http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
2建立nginx的yum仓库
rpm -ivh nginx-1.9.9-1.el7.ngx.x86_64.rpm
3使用yum下载并安装nginx
yum install nginx
4启动nginx服务并设置开机启动
systemctl start nginx.service
systemctl enable nginx.service
5查看nginx服务是否启动