(1)使用yum安装nginx需要包括Nginx的库,安装Nginx的库
#rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
(2)使用下面命令安装nginx
#yum install nginx
3.云服务器 CentOS 7 下重启服务不再通过 service 操作,而是通过 systemctl 操作。
查看:systemctl status sshd.service
启动:systemctl start sshd.service
重启:systemctl restart sshd.service
自启:systemctl enable sshd.service