从零开始构建集群前期准备之---yum源

    工做中大多数使用centos系统,当咱们安装完centos系统的时候其实yum已经配置好了。咱们直接执行yum install 软件包名称 就能够安装好一个软件包。他默认使用配置好的centos的源。但好多人习惯都使用下面的这二个源centos

一、这是中科大的源ide

cd /etc/yum.repos.d
mv CentOS-Base.repo CentOS-Base.repo.save   //先重命名Centos自带的yum源。
wget http://mirrors.ustc.edu.cn/centos/CentOS-Base.5.mirrors.repo O /etc/yum.repos.d/CentOS-Base.repo
yum makecachespa

二、这是sohu的源orm

cd /etc/yum.repos.d
mv CentOS-Base.repo CentOS-Base.repo.save   //先重命名Centos自带的yum源。
wget http://mirrors.sohu.com/help/CentOS-Base-sohu.repo
yum makecache进程

PS:
有时候会出现错误,现象:
Loading "installonlyn" plugin
Existing lock /var/run/yum.pid: another copy is running. Aborting.get

这是由于yum在更新, 此时是kill不掉的该进程的, 正确的解决方法是让它中止更新便可。 
能够直接输入 rm -f /var/run/yum.pid 
也能够/etc/init.d/yum-updatesd stop it

相关文章
相关标签/搜索