作者:【吴业亮】云计算开发工程师
博客:http://blog.csdn.net/wylfengyujiancheng
redhat 的更新包只对注册的用户生效,所以我们自己手动更改成CentOS 的更新包,CentOS几乎和redhat是一样的,所以无需担心软件包是否可安装,安装之后是否有问题。
1、首先删除redhat原有的yum ,因为redhat 原本的yum 没有注册为redhat用户是用不了的。
rpm -aq|grep yum|xargs rpm -e --nodeps
rpm -aq|grep python-iniparse|xargs rpm -e --nodeps
2、下载163的yum 安装包
# wget http:
# wget http:
# wget http:
# wget http:
3、安装下载的rpm包
rpm -ivh *.rpm
4、创建文件/etc/yum.repos.d/rhel-debuginfo.repo并写入
[base]
name=CentOS-$releasever - Base
baseurl=http://mirrors.163.com/centos/7.2.1511/os/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/7.2.1511/os/x86_64/RPM-GPG-KEY-CentOS-7
[updates]
name=CentOS-$releasever - Updates
baseurl=http://mirrors.163.com/centos/7.2.1511/updates/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/7.2.1511/os/x86_64/RPM-GPG-KEY-CentOS-7
[extras]
name=CentOS-$releasever - Extras
baseurl=http://mirrors.163.com/centos/7.2.1511/extras//$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/7.2.1511/os/x86_64/RPM-GPG-KEY-CentOS-7
[centosplus]
name=CentOS-$releasever - Plus
baseurl=http://mirrors.163.com/centos/7.2.1511/centosplus//$basearch/
gpgcheck=1
enabled=0
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
6、 yum clean all
7、 yum update 测试。
8、 安装 epel 源
# yum install epel-release