2.CentOS改换阿里源
2.CentOS更换阿里源
第一步:备份本地yum源
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
第二步:下载阿里yum源文件
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
第三步:生成yum缓存
yum clean all
yum makecache
出现如下错误:
已加载插件:fastestmirror, langpacks
/var/run/yum.pid 已被锁定,PID 为 98081 的另一个程序正在运行。
Another app is currently holding the yum lock; waiting for it to exit...
内存: 99 M RSS (982 MB VSZ)
已启动: Thu Sep 17 14:32:44 2015 - 58:52之前
状态 :睡眠中,进程ID:98081
解决方法:
# rm -rf /var/run/yum.pid
然后继续后续操作即可!