Redhat系统安装CentOS的yum源
2020-03-31 18:44
1476 查看
1、首先查看redhat系统本身所安装的那些yum 软件包:
rpm -qa | grep yum
2、卸载这些软件包(上一步出现多少安装包就卸载多少个);
rpm -e yum-(安装包名) --nodeps
3、保证本机电脑能上网;
ping www.baidu.com
4、进入以下网站上面查看软件包的版本是否升级或者找到自己系统所对应的文件包版本更新;
CentOS网络源地址:http://centos.ustc.edu.cn/centos/
5、找到自己所需要的版本下载:
wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-3.4.3-150.el7.centos.noarch.rpm wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpm wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-utils-1.1.31-40.el7.noarch.rpm wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-updateonboot-1.1.31-40.el7.noarch.rpm wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.31-40.el7.noarch.rpm
6、查看下载完成结果;
ls anaconda-ks.cfg yum-plugin-fastestmirror-1.1.31-40.el7.noarch.rpm initial-setup-ks.cfg yum-updateonboot-1.1.31-40.el7.noarch.rpm yum-3.4.3-150.el7.centos.noarch.rpm yum-utils-1.1.31-40.el7.noarch.rpm yum-metadata-parser-1.1.4-10.el7.x86_64.rpm
7、安装软件包:
rpm -ivh yum-*
warning: yum-3.4.3-150.el7.centos.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY error: Failed dependencies: python-urlgrabber >= 3.10-8 is needed by yum-3.4.3-150.el7.centos.noarch
安装的python-urlgrabber版本不符合您尝试安装的RPM的依赖关系,yum源网站(网址:http://rpm.pbone.net/
)下载上面这五个较低版本的安装包,在来安装就不会有问题了
yum-3.4.3-132.el7.centos.0.1.noarch.rpm yum-metadata-parser-1.1.4-10.el7.x86_64.rpm yum-plugin-fastestmirror-1.1.31-34.el7.noarch.rpm yum-updateonboot-1.1.31-34.el7.noarch.rpm yum-utils-1.1.31-34.el7.noarch.rpm
8、下载好后重新安装:
ls yum-3.4.3-132.el7.centos.0.1.noarch.rpm yum-updateonboot-1.1.31-34.el7.noarch.rpm yum-metadata-parser-1.1.4-10.el7.x86_64.rpm yum-utils-1.1.31-34.el7.noarch.rpm yum-plugin-fastestmirror-1.1.31-34.el7.noarch.rpm rpm -ivh yum-*warning: yum-3.4.3-132.el7.centos.0.1.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY Preparing... ################################# [100%] Updating / installing... 1:yum-metadata-parser-1.1.4-10.el7 ################################# [ 20%] 2:yum-plugin-fastestmirror-1.1.31-3################################# [ 40%] 3:yum-3.4.3-132.el7.centos.0.1 ################################# [ 60%] 4:yum-updateonboot-1.1.31-34.el7 ################################# [ 80%] 5:yum-utils-1.1.31-34.el7 ################################# [100%]
这次没有报错了,安装完成!!!
9、新建repo 配置文件;
vim /etc/yum.repos.d/CentOS-Base.repo #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-$7 - Base - 163.com #mirrorlist=http://mirrorlist.centos.org/?release=$7&arch=$basearch&repo=os baseurl=http://mirrors.163.com/centos/7/os/$basearch/ gpgcheck=1 gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7 #released updates [updates] name=CentOS-$7 - Updates - 163.com #mirrorlist=http://mirrorlist.centos.org/?release=$7&arch=$basearch&repo=updates baseurl=http://mirrors.163.com/centos/7/updates/$basearch/ gpgcheck=1 gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7 #additional packages that may be useful [extras] name=CentOS-$7 - Extras - 163.com #mirrorlist=http://mirrorlist.centos.org/?release=$7&arch=$basearch&repo=extras baseurl=http://mirrors.163.com/centos/7/extras/$basearch/ gpgcheck=1 gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7 #additional packages that extend functionality of existing packages [centosplus] name=CentOS-$7 - Plus - 163.com baseurl=http://mirrors.163.com/centos/7/centosplus/$basearch/ gpgcheck=1 enabled=0 gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7
10、清除缓存:
yum clean all
11、测试安装是否正常;
yum -y install lftp
不报错就安装成功
- 点赞
- 收藏
- 分享
- 文章举报
相关文章推荐
- Redhat系统安装YUM(使用CentOS的KEY)
- 使用光盘建立redhat fedora centos等的本地yum源 安装光盘中的软件
- Redhat 使用CentOS的yum源进行升级或软件安装
- CentOS系统下编译安装MySQL以及设置相关yum源的教程
- redhat 系统 配置 CentOS的yum源
- redhat6.3系统下的kscope1.6.2安装——RHEL6.3 本地创建YUM源
- redhat(rhel)用CentOS的yum源更新/安装软件 推荐
- Redhat 使用CentOS的yum源进行升级或软件安装
- 在centos/redhat 上安装邮件系统(extmail) V0.1(转)
- Redhat 使用CentOS的yum源进行升级或软件安装
- 转:CentOS系统yum源配置修改、yum安装软件包源码包出错解决办法!
- redhat 7安装CentOS 7 yum源
- CentOS系统下编译安装MySQL以及设置相关yum源的教程
- windows下硬盘安装CentOS或RedHat双系统
- Redhat 使用CentOS的yum源进行升级或软件安装
- redhat6.5 空系统下安装yum及 更新链接为centos
- CentOS更改yum源与更新系统 ,安装软件
- 安装CentOS 7双系统(三)——yum源的高级配置
- centos7.4系统中yum源安装mysql 5.6