很多时候,使用CentOS自带的软件源并不能解决所有的软件依赖包。这里介绍在CentOS或RHEL系列中安装epel源和rpmforce源
安装epel源
CentOS5
Or RHEL5
32
bit
1 | rpm -ivh http://mirrors.kernel.org/fedora-epel/5/i386/epel-release-5-4.noarch.rpm |
CentOS5
Or RHEL5
64
bit
1 | rpm -ivh http://mirrors.kernel.org/fedora-epel/5/x86_64/epel-release-5-4.noarch.rpm |
CentOS6
Or RHEL6
32
bit
1 | rpm -ivh http://mirrors.kernel.org/fedora-epel/6/i386/epel-release-6-8.noarch.rpm |
CentOS6
Or RHEL6
64
bit
1 | rpm -ivh http://mirrors.kernel.org/fedora-epel/6/x86_64/epel-release-6-8.noarch.rpm |
CentOS7
Or RHEL7
64
bit
1 | rpm -ivh http://mirrors.kernel.org/fedora-epel/7/x86_64/e/epel-release-7-5.noarch.rpm |
测试
1 | [root@rhel65-test-1 ~]# yum repolist |
#安装rpmforce源
CentOS5
Or RHEL5
32
bit
1 | rpm -ivh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el5.rf.i386.rpm |
CentOS5
Or RHEL5
64
bit
1 | rpm -ivh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el5.rf.x86_64.rpm |
CentOS6
Or RHEL6
32
bit
1 | rpm -ivh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.i686.rpm |
CentOS6
Or RHEL6
64
bit
1 | rpm -ivh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm |
测试
1 | [root@rhel65-test-1 ~]# yum repolist |
附录:内置源替换为163源
收录架构
i386
x86_64
SRPMS收录版本
所有版本
更新时间
每4小时更新一次
使用说明
首先备份
/etc/yum.repos.d/CentOS-Base.repo
1 | mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup |
- 下载对应版本repo文件, 放入/etc/yum.repos.d/(操作前请做好相应备份)
- 运行以下命令生成缓存
1 | yum clean all |
相关连接:163yum源官方帮助