Centos 7 服务器安装 Nginx

废话不多说

1、添加阿里源链接

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

 

2、生成缓存,会把新下载CentOS-Base.repo源生效

yum makecache

 3、更新源

yum -y update

 

4、安装nginx

sudo yum install nginx

5、看下如下内容,安装完成

6、启动nginx

sudo systemctl start nginx

7、访问主页即可。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章