官网下载的rhel,安装后是没有配置yum源的,需要自己配置yum源。网络上的很难找到rhel的yum源,但是在ISO镜像里面有很多redhat提供的软件包,也是正版软件,我们可以把这个拷贝出来,自己建立yum源。
 第一种:搭建本地源
1、安装成功rhel后,我们使用yum会发现提示未注册,第一步,从ISO镜像中拷贝出软件包,放到桌面上一个叫base的文件夹里。
 
 
2、搭建一个ftp环境,允许匿名登录。匿名登录的帐号为anonymous,密码没有。将ftp的默认目录设置在base文件夹那一路径。我这里将ftp目录指定在桌面上的。
 
3、登录rhel,配置yum源。
 
cd /etc/yum.repos.d
vi base.repo
 
输入以下配置,红色更改成你ftp的ip地址,蓝色是名称顺便写。
 
[base]
name=my base repo
baseurl=ftp://192.168.7.62/base
enabled=1
gpgcheck=1
gpgkey=ftp://192.168.7.62/base/RPM-GPG-KEY-redhat-release
 
4、完成,可以使用yum。
 
 
第二种:使用centos的仓库,让rhel使用centos的仓库
 
如下是163.rep的配置文件,我的系统是rhel 7.3 对应着 centos 7.3.1611版本,下面是配置文件,在/etc/yum.repo.d/下新建163.repo,将如下的内容拷贝进去。
       注意:1)、拷贝进去后,要修改的参数是,请参照http://mirrors.163.com/开源网站的具体路径对应你所用的系统版本。这份配置文件支持rhel 7使用centos 7的yum仓库。
                 2)、使用前请将原有仓库备份。并执行yum clean all 指令。  
                 3)、正常使用yum
 
[root@localhost yum.repos.d]# cat 163.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.3.1611 - Base - 163.com
#mirrorlist=http://mirrorlist.centos.org/?release=7.3.1611&arch=x86_64&repo=os
baseurl=http://mirrors.163.com/centos/7.3.1611/os/x86_64/
enabled=1
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7
 
#released updates
[updates]
name=CentOS-7.3.1611 - Updates - 163.com
#mirrorlist=http://mirrorlist.centos.org/?release=7.3.1611&arch=x86_64&repo=updates
baseurl=http://mirrors.163.com/centos/7.3.1611/updates/x86_64/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7
enabled=1
 
#additional packages that may be useful
[extras]
name=CentOS-7.3.1611 - Extras - 163.com
#mirrorlist=http://mirrorlist.centos.org/?release=7.3.1611&arch=x86_64&repo=extras
baseurl=http://mirrors.163.com/centos/7.3.1611/extras/x86_64/
gpgcheck=1
enabled=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7
 
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-7.3.1611 - Plus - 163.com
baseurl=http://mirrors.163.com/centos/7.3.1611/centosplus/x86_64/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7
 

最新文章

  1. 利用powerDesigner16.5连接oracle数据库并自动生成表结构图
  2. bzoj3631树链剖分
  3. PHP之call user func()函数
  4. 深入理解URL
  5. SortedSet有序集合类型
  6. Storm calculate pv
  7. 发布HTML5 RTS游戏-古代战争
  8. MSSQLServer基础01(数据类型)
  9. VS下面的编译错误-----转换到 COFF 期间失败: 文件无效或损坏
  10. 如果ASM磁盘组由哪些物理磁盘组成?
  11. Python easy_insatll 安装包
  12. Web框架——Django笔记
  13. img标签实现和背景图一样的显示效果——object-fit和object-positon
  14. Linux 高性能服务器编程——高性能服务器程序框架
  15. 解决ruby安装后无法添加淘宝gem源------------学习记录
  16. 做数据挖掘,就算发 20 几分的 CNS 子刊,也是垃圾!?--转载
  17. OpenGL绘制一个四边形
  18. sqlserver中的数据转换与子查询
  19. 这些简单实用的Word技巧,你get了吗
  20. python 3.4 error: Microsoft Visual C++ 10.0 is required(Unable to find vcvarsall.bat)

热门文章

  1. Asp.net MVC5 框架揭秘 S412 实例解析 – 绝妙的扩展 模式的胜利
  2. js 复选框 全选都选 如果某一个子复选框没选中 则全选按钮不选中
  3. python学习笔记系列----(五)输入和输出
  4. iOS 简单的分段下载文件
  5. js和jq添加新表格
  6. ecplise常用快捷键
  7. ADB server didn't ACK
  8. js判断变量是否等于undefined
  9. Java数据结构之字符串模式匹配算法---KMP算法
  10. 10 个实用技巧,让 Finder 带你飞