Centos7 yum安装Nginx

1、添加源

sudo rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm

 

2、yum安装Nginx

sudo yum install -y nginx

 

3、启动Nginx并设置开机自动运行

sudo systemctl start nginx.service
sudo systemctl enable nginx.service

 

4、查看是否安装成功

在浏览器中输入:http://centos的ip地址

posted @ 2019-07-26 14:13  576  阅读(119)  评论(0编辑  收藏  举报