6.8Linux-yum源配置

总目录:https://blog.****.net/qq_41106844/article/details/105553392

Linux - 子目录:https://blog.****.net/qq_41106844/article/details/105553394

 

 

配置本地yum源

cd /etc/yum.repos.d/   #进入yum配置目录 

touch  rhel7.repo   #建立yum配置文件 

vim  rhel7.repo   #编辑配置文件,添加以下内容 

[rhel-yum]

name=rhel7   #自定义名称 

baseurl=file:///mnt#本地光盘挂载路径 

enabled=1   #启用yum源,0为不启用,1为启用 

gpgcheck=0  #检查GPG-KEY,0为不检查,1为检查 

:wq! #保存退出 

yum clean all   #清除yum缓存 

yum makecache  #缓存本地yum源中的软件包信息

 
6.8Linux-yum源配置