执行如焉命令安装Nginx源
[root@localhost ~] rpm -ivh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
[root@localhost ~] yum install nginx
配置开机启动与启动
[root@localhost ~] systemctl enable nginx
[root@localhost ~] systemctl start nginx
启动nginx
[root@localhost ~] nginx
测试Nginx配置是否正确
[root@localhost ~] nginx -t
优雅重启
[root@localhost ~] nginx reload