RedHat6配置yum
来源:互联网 发布:意大利面料 知乎 编辑:程序博客网 时间:2024/05/22 06:35
总结:软件的更新很快,仓库的软件也会随时更新,网络上的教程基本上是正确的,但要注意软件的版本信息等
1.删除redhat原有的yum
rpm -aq|grep yum|xargs rpm -e --nodeps
2.下载yum安装文件
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-3.2.29-60.el6.centos.noarch.rpm
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-30.el6.noarch.rpm
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm
3.进行安装yum
rpm -ivh python-iniparse-0.3.1-2.1.el6.noarch.rpm
rpm -ivh yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
rpm -ivh yum-3.2.29-60.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-30.el6.noarch.rpm
注意最后两个包必需同时安装,否则会相互依赖
4.更新repo文件
mv /etc/yum.repos.d/rhel-debuginfo.repo /etc/yum.repos.d/rhel-debuginfo.repo.repo.bak
vi /etc/yum.repos.d/rhel-debuginfo.repo
内容为:(以下面的内容为准,之前网上摘的那个不是最新的)
# CentOS-Base.repo## CentOS-4 is past End of Life ... use at your own risk#[base]name=CentOS-$releasever - Basebaseurl=http://vault.centos.org/4.9/os/$basearch/gpgcheck=1gpgkey=http://vault.centos.org/RPM-GPG-KEY-centos4protect=1priority=1#released updates [update]name=CentOS-$releasever - Updatesbaseurl=http://vault.centos.org/4.9/updates/$basearch/gpgcheck=1gpgkey=http://vault.centos.org/RPM-GPG-KEY-centos4protect=1priority=1#packages used/produced in the build but not released[addons]name=CentOS-$releasever - Addonsbaseurl=http://vault.centos.org/4.9/addons/$basearch/gpgcheck=1gpgkey=http://vault.centos.org/RPM-GPG-KEY-centos4protect=1priority=1#additional packages that may be useful[extras]name=CentOS-$releasever - Extrasbaseurl=http://vault.centos.org/4.9/extras/$basearch/gpgcheck=1gpgkey=http://vault.centos.org/RPM-GPG-KEY-centos4protect=1priority=1#additional packages that extend functionality of existing packages[centosplus]name=CentOS-$releasever - Plusbaseurl=http://vault.centos.org/4.9/centosplus/$basearch/gpgcheck=1enabled=0gpgkey=http://vault.centos.org/RPM-GPG-KEY-centos4protect=1priority=2#contrib - packages by Centos Users[contrib]name=CentOS-$releasever - Contribbaseurl=http://vault.centos.org/4.9/contrib/$basearch/gpgcheck=1enabled=0gpgkey=http://vault.centos.org/RPM-GPG-KEY-centos4protect=1priority=2
5、yum clean all
6、yum list 进行测试
注意:
有时候上面的方法会出现问题,可以参考一下这个(我第一次测试的时候完全可以,第二次弄的时候就出问题了,好像是因为CentOS-4已经停止发布了)http://blog.sina.com.cn/s/blog_4a5eb9980102v2e1.html
(其它源)
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#
[base]
name=CentOS-6 - Base - 163.com
baseurl=http://mirrors.163.com/centos/6/os/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=os
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
#released updates
[updates]
name=CentOS-6 - Updates - 163.com
baseurl=http://mirrors.163.com/centos/6/updates/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=updates
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
#additional packages that may be useful
[extras]
name=CentOS-6 - Extras - 163.com
baseurl=http://mirrors.163.com/centos/6/extras/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=extras
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-6 - Plus - 163.com
baseurl=http://mirrors.163.com/centos/6/centosplus/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=centosplus
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
#contrib - packages by Centos Users
[contrib]
name=CentOS-6 - Contrib - 163.com
baseurl=http://mirrors.163.com/centos/6/contrib/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=contrib
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
- redhat6配置yum源
- redhat6 yum代理配置
- redhat6配置yum源
- RedHat6配置yum
- RedHat6 yum源配置
- redhat6.4配置yum
- Redhat6 配置网易YUM源
- Redhat6 yum 安装与配置
- 配置 Redhat6 yum 更新源
- redhat6 yum安装与配置
- Redhat6 yum 安装与配置
- RedHat6.5网络yum配置
- redhat6 配置centos6 yum替换
- RedHat6.4配置yum源
- redhat6.8配置yum源
- redhat6.0 配置源使用CentOS yum
- redhat6.4 配置centos6 yum替换
- RedHat6配置CentOS6的yum源方法
- CentOS下安装实时检测网络带宽的小工具bmon
- Kafka深度解析
- linux小操作-两个命令
- maximum-depth-of-binary-tree
- poj 1163
- RedHat6配置yum
- 清理mysql的sleep链接
- 在一个字符串中查找另一个字符串出现的次数
- setValue和setObject的区别
- storm与hadoop的对比
- Google Advertising ID 简介以及快速集成和使用
- Singleton单例模式
- Android照片墙应用实现,再多的图片也不怕崩溃
- Android开发规范