更新yum源
安装wget
yum install -y wget
备份
cd /etc/yum.repos.d/
mkdir repo_bak
mv *.repo repo_bak/
下载新的CentOS-Base.repo 到/etc/yum.repos.d/
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
#
sed -i -e '/mirrors.cloud.aliyuncs.com/d' -e '/mirrors.aliyuncs.com/d' /etc/yum.repos.d/CentOS-Base.repo
yum clean all 清除缓存,运行 yum makecache 生成新的缓存
yum clean all
yum makecache
安装EPEL(Extra Packages for Enterprise Linux )源
yum install -y epel-release
再次运行yum clean all 清除缓存,运行 yum makecache 生成新的缓存
查看启用的yum源和所有的yum源
yum repolist enabled
yum repolist all
更新yum
yum -y update
关闭NetworkManager
systemctl stop NetworkManager
systemctl disable NetworkManager
安装vim
yum install -y vim
关闭防火墙
systemctl stop firewalld
systemctl disable firewalld
嗨,这是一条评论。
要开始审核、编辑及删除评论,请访问仪表盘的“评论”页面。
评论者头像来自Gravatar。