注]请以root身份操作
由于 redhat的yum在线更新是收费的,如果没有注册的话不能使用,如果要使用,需将redhat的yum卸载后,重启安装,再配置其他源
解决办法:
1、首先到http://mirrors.163.com/centos下载软件包
x86 地址:http://mirrors.163.com/centos/6/os/i386/Packages/
x86_64 地址:http://mirrors.163.com/centos/6/os/x86_64/Packages/
x86_64 地址1: http://ftp.nara.wide.ad.jp/pub/Linux/centos/6.5/os/x86_64/Packages/
必要下载的软件包有(以64位系统为例):
1> python-iniparse-0.3.1-2.1.el6.noarch.rpm
2> yum-3.2.29-40.el6.centos.noarch.rpm
3> yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
4> yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm
下载命令:
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/python-iniparse-0.3.1-2.1.el6.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-3.2.29-60.el6.centos.noarch.rpm
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-30.el6.noarch.rpm
[注] :版本不一定要最新的(http://mirrors.163.com/centos/6/os/x86_64/Packages/ 查找对应版本)
卸载RedHat自带的yum
rpm -qa | grep yum | xargs rpm -e --nodeps
3、安装下载的centos的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
[注] :最后2个需要一起安装,否则会出现依赖性错误
4、到http://mirrors.163.com的 centos帮助文档 中下载CentOS6-Base-163.repo文件,存放到/etc/yum.repo.d中
wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
5、编辑CentOS6-Base-163.repo文件,将其中的$releasever更改为centos的版本号下面是修改好的:
# 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.5 - Base - 163.com
baseurl=http://mirrors.163.com/centos/6.5/os/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6.5&arch=$basearch&repo=os
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
#released updates
[updates]
name=CentOS-6.5 - Updates - 163.com
baseurl=http://mirrors.163.com/centos/6.5/updates/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6.5&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.5 - Extras - 163.com
baseurl=http://mirrors.163.com/centos/6.5/extras/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6.5&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.5 - Plus - 163.com
baseurl=http://mirrors.163.com/centos/6.5/centosplus/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6.5&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.5 - Contrib - 163.com
baseurl=http://mirrors.163.com/centos/6.5/contrib/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6.5&arch=$basearch&repo=contrib
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
6、yum clean all 清除原有缓存
7、yum makecache 获取yum列表
出现下面提示,表示yum更改完成:
Metadata Cache Created
脚本:
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
# Check if user is root
if [ $(id -u) != "0" ]; then
echo "Error: You must be root to run this script"
exit 1
fi
clear
echo "========================================================================="
echo "Replace Redhat Enterprise Yum to CentOS Yum and Repos, Written by Licess"
echo "========================================================================="
# uninstall rhel yum
echo "Uninstall Rhel Yum......"
rpm -qa|grep yum|xargs rpm -e --nodeps
# delete old rpm
echo "Clean old cache......"
rm -rf python-iniparse-0.3.1-2.1.el6.noarch.rpm
rm -rf yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
rm -rf yum-3.2.29-60.el6.centos.noarch.rpm
rm -rf yum-plugin-fastestmirror-1.1.30-30.el6.noarch.rpm
# download CentOS Yum
echo "Download Python-iniparse......"
wget http://mirrors.163.com/centos/6. ... -2.1.el6.noarch.rpm
echo "Download yum-metadata-parse......"
wget http://mirrors.163.com/centos/6. ... 2-16.el6.x86_64.rpm
echo "Download yum......"
wget http://mirrors.163.com/centos/6. ... 6.centos.noarch.rpm
echo "Download yum fastmirror......"
wget http://mirrors.163.com/centos/6. ... 0-14.el6.noarch.rpm
# install CentOS Yum
echo "Installing......"
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-40.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm
# replace repos
rm -rf /etc/yum.repos.d/CentOS-Base.repo
echo "[base]
name=CentOS-6.5 - Base - 163.com
baseurl=http://mirrors.163.com/centos/6.5/os/x86_64/
#mirrorlist=http://mirrors.163.com/?release=6.5&arch=$basearch&repo=os
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6
#released updates
[updates]
name=CentOS-6.5 - Updates - 163.com
baseurl=http://mirrors.163.com/centos/6.5/updates/x86_64/
#mirrorlist=http://mirrors.163.com/?release=6.5&arch=$basearch&repo=updates
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6
#additional packages that may be useful
[extras]
name=CentOS-6.5 - Extras - 163.com
baseurl=http://mirrors.163.com/centos/6.5/extras/x86_64/
#mirrorlist=http://mirrors.163.com/?release=6.5&arch=$basearch&repo=extras
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-6.5 - Plus - 163.com
baseurl=http://mirrors.163.com/centos/6.5/centosplus/x86_64/
#mirrorlist=http://mirrors.163.com/?release=6.5&arch=$basearch&repo=centosplus
gpgcheck=1
enabled=0
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6
#contrib - packages by Centos Users
[contrib]
name=CentOS-6.5 - Contrib - 163.com
baseurl=http://mirrors.163.com/centos/6.5/contrib/x86_64/
#mirrorlist=http://mirrors.163.com/?release=6.5&arch=$basearch&repo=contrib
gpgcheck=1
enabled=0
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6" >> /etc/yum.repos.d/CentOS-Base.repo
#####
yum clean all
yum makecache
yum update
echo "=========================================================================="
echo "You have successfully replace RedhatEnterprise Yum to CentOS yum and repos"
echo "=========================================================================="
- 浏览: 627591 次
- 性别:
- 来自: 杭州
-
文章分类
- 全部博客 (334)
- java core (12)
- struts2.x (2)
- spring (3)
- hibernate (8)
- jpa (6)
- maven (2)
- osgi (5)
- eclipse (4)
- struts2.x+spring2.x+hibernate 整合 (5)
- ebs (0)
- html (0)
- vaadin (1)
- css (0)
- jquery (0)
- javascript (0)
- svn (1)
- cvs (0)
- axas2.x (0)
- eclipse+maven (9)
- annotation (0)
- 基于OSGi的动态化系统搭建 (1)
- notenet (1)
- jboss eclipse (4)
- eclipse工具 (4)
- jdk1.6+maven3.0.3+nuxeo+svn+felix+cxf+spring+springDM (6)
- spring dm (1)
- Nexus介绍 (1)
- proxool listener (0)
- oracle (4)
- mysql (8)
- 搭建你的全文检索 (1)
- hibernatehibernatehibernate (0)
- cvsearchcvsearch (0)
- mycvseach (0)
- asdfasdfasdf (0)
- propertiey (0)
- hibernate annotation (0)
- libs (0)
- icam (2)
- start 数据库配置 (0)
- jboss (1)
- 让Eclipse启动时显示选择workspace的对话框 (1)
- table表头固定 (1)
- s2s3h4 (0)
- leaver (0)
- mycvsaerchddd (0)
- 关于jboss5.0.1部署 (4)
- bookmarks (0)
- PersistenceUnitDeployment (0)
- mycom (0)
- HKEY_CURRENT_USER = &H80000001 (0)
- syspath (1)
- css div (1)
- Dreamweaver CS5 (0)
- generate (0)
- mysql查看表结构命令 (1)
- LOG IN ERROR EMAIL TO SB (0)
- struts2 handle static resource (1)
- jsf (2)
- log4j (1)
- jbpm4.4 (2)
- down: jbpm4.4 (1)
- jstl1.2 (1)
- spring annotation (1)
- java design pattern (1)
- cache (1)
- ehcache (1)
- 11111 (0)
- myge (0)
- pom.xml (0)
- springquartz (0)
- OpenStack (9)
- hadoop (2)
- nginx (1)
- hadoop openstack (1)
- os (1)
- hadoop-2.6.0 zookeeper-3.4.6 hbase-0.98.9-hadoop2 集群 (5)
- hadoop2.7.0 ha Spark (2)
- tess (0)
- system (1)
- asdf (0)
- hbase (2)
- hbase create table error (1)
- ekl (1)
- gitignore (1)
- gitlab-ci.yml (1)
- shell (1)
- elasticsearch (2)
- Azkaban 3.0+ (1)
- centos用命令 (1)
- hive (1)
- kafka (1)
- CaptureBasic (0)
- CentOS7 (1)
- dev tools (1)
- README.md (1)
- Error (1)
- teamviewerd.service (1)
- scala (1)
- spark (1)
- standard (1)
- gitlab (1)
- IDEA (0)
- ApplicationContext (1)
- 传统数仓 (1)
- redis install (1)
- MYSQL AND COLUME (1)
- java版本选择 (1)
- hue (1)
- npm (1)
- es (1)
- 版本管理 (1)
- 升级npm版本 (1)
- git (1)
- 服务器参数设置 (1)
- 调大 IDEA 编译内存大小 (0)
- CentOS8安装GitLab (1)
- gitlab安装使用 (1)
最新评论
-
ssydxa219:
vim /etc/security/limits.confvi ...
ekl -
Gamehu520:
table中无数据
hbase 出现的问题 -
Xleer0102:
为什么都是只有问没有答,哭晕在厕所
hbase 出现的问题 -
jiajiao_5413:
itext table -
CoderDream:
不完整,缺com.tcs.org.demostic.pub.u ...
struts2.3.1.1+hibernate3.6.9Final+spring3.1.0+proxool+maven+annotation
相关推荐
redhat6 版本yum安装所需要的依赖包,解决yum安装过程的问题
使用yum安装gcc,C语言编译环境,编程环境的搭建,C++编程环境。
linux的在线更新包可使用 rpm -ivh yum-*.rpm安装 安装完之后比如你要安装GCC编译器:yum install gcc
使用`yum update`或`yum install`命令时,`yum`会读取`yum.repos.d`目录下的所有`.repo`文件,并根据其中的配置来决定从哪个仓库下载软件包。 总的来说,`redhat7.9 + yum.repos.d` 和相关的`.repo`文件是RHEL 7.9...
4. 使用`make install`将编译好的Yum安装到系统中。 在执行以上步骤时,确保系统已经具备了编译和安装软件的基本环境,例如开发头文件、库等。如果在编译过程中遇到依赖问题,可能需要手动安装相应的开发工具包。 ...
标题"Redhat 6.9 yum源的替换"表明我们要讨论如何为RHEL 6.9替换默认的yum源。描述中提到的“郁闷源”可能指的是官方源已经不再提供支持,而“163.repo”则是一个第三方的yum源,通常由网易提供,它包含了大量的...
1. **安装软件**:通过`yum install <package_name>`命令,你可以安装所需的软件包,`yum`会自动处理依赖关系,确保所有必要的包都能正确安装。 2. **更新软件**:使用`yum update <package_name>`或`yum update`...
例如,使用 yum update 命令可以更新所有的软件包,使用 yum install 命令可以安装新的软件包。 Red Hat Linux 配置 YUM 详解是指在 Red Hat Linux 系统中,如何配置 YUM 软件包管理器,以便更好地管理系统中的...
在RedHat AS6.2中,Yum是163的镜像,经过测试,证明了在安装Oracle时需要使用yum install命令,才在RedHat上配置了Yum。下面是该配置过程中的知识点总结: 什么是Yum源? Yum(Yellow dog Updater Modified)是一种...
3. **执行更新**:使用`yum update`或`yum install`命令,参照新配置的`local`仓库进行操作。 通过以上步骤,你可以成功地为RHEL 6.5配置YUM源,无论是使用在线的镜像服务还是本地仓库,都能有效提升系统管理和维护...
如果你使用RPM(Red Hat Package Manager)或yum(Yellowdog Updater, Modified)工具来安装MySQL,卸载时需要特别注意,因为简单地使用`rpm -e`或`yum remove`可能无法完全清除所有相关的配置文件和数据。...
* `yum install`:安装软件包 * `yum remove`:卸载软件包 * `yum update`:更新软件包 * `yum list`:显示软件包列表 * `yum clean`:清除软件包缓存 YUM 源配置文件 YUM 源配置文件是存放在 `/etc/yum.repos.d` ...
mv /etc/yum.repos.d/redhat.repo /etc/yum.repos.d/redhat.repo.bak ``` 2. **下载CentOS的YUM配置**: 可以通过wget或curl命令从CentOS的官方镜像站点下载相应的配置文件,比如: ``` wget ...
- `yum install <package>`:安装指定的软件包。 - `yum remove <package>`:卸载软件包。 - `yum update <package>`:更新指定的软件包,如果未指定则更新所有已安装的软件包。 - `yum search <keyword>`:在仓库中...
标题“redhat换yum源”暗示了这个过程是针对Red Hat系统,可能是为了升级`yum`或改变其指向的软件仓库。`yum`源可以来自多个地方,包括官方RHEL/CentOS仓库、第三方镜像或企业自建的内部仓库。更换`yum`源的主要原因...
通过运行`yum install python3*`命令,可以从CentOS 8的ISO镜像中安装Python 3。 最后,再次卸载Red Hat的`yum`包,确保所有相关组件都已被移除。再次执行`rpm -qa | grep yum | xargs rpm -e --nodeps`。然后,你...
最后,尝试使用`yum install`安装一个新软件包,以确认`yum`已经完全恢复功能。 在处理这类问题时,了解基本的RPM包管理原理和Linux系统管理知识是非常重要的。如果你的系统是RHEL(Red Hat Enterprise Linux)或...
6. 最后,尝试使用`yum install httpd`命令来测试能否成功更新或安装软件。如果一切配置正确,YUM将会自动下载所需头文件,并完成软件更新。 通过这种方式,你可以利用CentOS 5的YUM源为RHEL AS5系统提供软件更新,...
它提供了命令行界面,让用户能够执行像`yum install`, `yum update`, `yum remove`等命令。 2. `yum-utils-1.1.30-41.el6.noarch.rpm`:这个包包含了`yum`的一些实用工具,如`presto`(用于加速软件包升级)和`yum-...
1. **安装软件包**:`yum install <package_name>`,例如`yum install httpd`会安装Apache HTTP服务器。 2. **更新软件包**:`yum update <package_name>` 或 `yum update`,前者更新指定包,后者更新所有已安装的...