在rhel7上搭建centos7的yum源
2017-09-14 09:20
447 查看
1. 再查看现在主机上的yum源,并将它们删除
2. 下载新的yum包
3. 按顺序将下载好的yum源安装
rpm -ivh
4. 更新yum源
5. 运行yum makecache生成缓存
[root@localhost ~]# rpm -qa|grep yum | xargs rpm -e --nodeps # --nodeps 不管有没有依赖的包,都将包删除
2. 下载新的yum包
#这里都是拿的是阿里云的yum源,需要先确定是否还存在资源,再进行下载 # PS: 请按顺序下载 wget https://mirrors.aliyun.com/centos/7/os/x86_64/Packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpm wget https://mirrors.aliyun.com/centos/7/os/x86_64/Packages/yum-3.4.3-150.el7.centos.noarch.rpm wget https://mirrors.aliyun.com/centos/7/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.31-40.el7.noarch.rpm wget https://mirrors.aliyun.com/centos/7/os/x86_64/Packages/yum-utils-1.1.31-40.el7.noarch.rpm wget https://mirrors.aliyun.com/centos/7/os/x86_64/Packages/python-urlgrabber-3.10-8.el7.noarch.rpm
3. 按顺序将下载好的yum源安装
rpm -ivh
4. 更新yum源
# 先备份主机上原先存在的yum源,免得出错 mv /etc/yum.repo.d/rhel-Base.repo ./rhel-Base.repo.bak #下载新的yum源到/etc/yum.repo.d/ wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo # 编辑Centos-7.repo , 将$releasever字样的地方全部替换为7 vi Centos-7.repo #在vi中命令模式下输入 %s/$releasever/7/g
5. 运行yum makecache生成缓存
yum clean all yum makecache yum update yum list
相关文章推荐
- rhel搭建本地yum源
- Linux(RHEL7及CentOS7)下DNS服务器的搭建与配置
- CentOS7 配置网卡 虚拟机挂载光盘 搭建本地yum源 修改主机名
- 工作环境搭建(2) - 为CentOS7添加yum源
- RHEL6.6环境下搭建本地yum源(Nginx版)
- centos7搭建自己的yum源
- CentOS7下的YUM源服务器搭建详解,过程写的很详细(转)
- 【APP】CentOS 5/RHEL 5下搭建本地YUM源
- 快速搭建RHEL5.9本地yum源
- RHEL系统以FTP服务器搭建yum源
- RHEL7环境下搭建本地yum源
- RHEL6.5 7.2更改为阿里云(aliyun)CentOS6 163 CentOS7的yum源
- RHEL6搭建本地yum源
- rhel的软件安装以及yum源的搭建
- rhel5.5快速搭建本地yum源
- RHEL系统以FTP服务器搭建yum源
- rhel6.2 本地yum源搭建
- CentOS 5/RHEL 5下搭建本地YUM源
- RHEL5下部署kickstart系统和搭建本地yum源 详细步骤
- RHEL6.6搭建CentOS6.6 yum源