搜索
❏ 站外平台:

rhel源更换为centos源

作者: sunkanggz

| 2014-05-12 08:51   收藏: 3    

1 删除rhel自带的yum包:

rpm -aq | grep yum |xargs rpm -e --nodeps

2 安装yum:

[china~/yum_64#]rpm -ivh python-iniparse-0.3.1-2.1.el6.noarch.rpm
warning:python-iniparse-0.3.1-2.1.el6.noarch.rpm: Header V3 RSA/SHA256 Signature, keyID c105b9de: NOKEY
Preparing...               ########################################### [100%]
packagepython-iniparse-0.3.1-2.1.el6.noarch is already installed
[china~/yum_64#]rpm -ivh yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
warning:yum-metadata-parser-1.1.2-16.el6.x86_64.rpm: Header V3 RSA/SHA1 Signature, keyID c105b9de: NOKEY
Preparing...               ########################################### [100%]
   1:yum-metadata-parser    ###########################################[100%]
[china~/yum_64#]rpm -ivh yum-3.2.29-40.el6.centos.noarch.rpmyum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm
warning:yum-3.2.29-40.el6.centos.noarch.rpm: Header V3 RSA/SHA1 Signature, key IDc105b9de: NOKEY
Preparing...               ########################################### [100%]
  1:yum-plugin-fastestmirro########################################### [50%]
  2:yum                   ########################################### [100%]
[ichina~/yum_64#]

若提示需要依赖

libc.so.6 is neededby yum-metadata-parser-1.1.2-16.el6.i686
libc.so.6(GLIBC_2.0)is needed by yum-metadata-parser-1.1.2-16.el6.i686
libc.so.6(GLIBC_2.1.3)is needed by yum-metadata-parser-1.1.2-16.el6.i686
libglib-2.0.so.0 is needed by yum-metadata-parser-1.1.2-16.el6.i686
libpthread.so.0 is needed by yum-metadata-parser-1.1.2-16.el6.i686
libpython2.6.so.1.0 is needed by yum-metadata-parser-1.1.2-16.el6.i686
libsqlite3.so.0 is needed by yum-metadata-parser-1.1.2-16.el6.i686
libxml2.so.2 is needed by yum-metadata-parser-1.1.2-16.el6.i686
libxml2.so.2(LIBXML2_2.4.30) is needed by yum-metadata-parser-1.1.2-16.el6.i686

安装: glibc-2.12-1.107.el6.x86_64.rpm http://pkgs.org/centos-6/centos-x86_64/glibc-2.12-1.132.el6.x86_64.rpm.html

3 添加网易163的yum源

获取文件:CentOS6-Base-163.repo

wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
cp CentOS-Base-163.repo rhel-source.repo
sed -i 's/\$releasever/6/g' rhel-source.repo

4 清空 yum 缓存

yum clean all

5 将服务器上的软件包信息缓存到本地

提高yum的更新效率

yum makecache

所需要的rpm打包地址:
http://pan.baidu.com/s/1hquYZ1i 

 


返回顶部

分享到微信

打开微信,点击顶部的“╋”,
使用“扫一扫”将网页分享至微信。