安装Redhat虚拟机的时候一般都不会填写注册信息,该产品是要购买的,因此无法用yum下载软件,需要进行配置。

1.进入YUM定义文件目录

cd /etc/yum.repos.d/

2.删除当前yun源

rm -rf *

3.新建并编辑yum文件,后缀必须为.repo

vim /etc/yum.repos.d/rhel7.repo

加入以下内容

[rhel7]
name=rhel7.repo
baseurl=http://mirrors.163.com/centos/7/os/x86_64/
enabled=1
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/7/os/x86_64/RPM-GPG-KEY-CentOS-7

RedHat7配置yum

4.检查配置

yum repolist

5.更新缓存

yum clean all 清除缓存
yum makecache 建立新的缓存

测试安装wireshark

RedHat7配置yum
配置完成

转载自:https://jingyan.baidu.com/article/c275f6ba6e2c80e33c75675e.html

相关文章: