cd /etc/yum.repos.d
mkdir repo_bak
mv *.repo repo_bak/

下载阿里云repo文件

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

清空yum缓存并且生成新的yum缓存

yum clean all
yum makecache

安装软件扩展源

yum install -y epel-release

查看更换的源

yum repolist

linux下安装nginx(yum源安装)

安装nginx

yum install nginx

启动

systemctl start nginx

网页查看

在浏览器上输入阿里云你自己服务器的ip地址,访问即可,如下表示启动成功

linux下安装nginx(yum源安装)

相关文章:

  • 2022-12-23
  • 2021-11-02
  • 2022-12-23
  • 2022-02-20
  • 2021-12-31
  • 2022-12-23
  • 2022-12-23
  • 2022-01-21
猜你喜欢
  • 2021-07-07
  • 2021-11-19
  • 2022-12-23
  • 2021-12-23
  • 2022-12-23
相关资源
相似解决方案