Created
January 15, 2018 03:20
-
-
Save zmaplex/cc19af07325d3c83ec0f63d5d96d71c1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 切换ROOT用户 | |
su root | |
# 进入 /etc/yum.repos.d 目录 | |
cd /etc/yum.repos.d/ | |
# 建立备份文件目录 | |
sudo mkdir /root/bak | |
# 移动所有文件到 /root/bak | |
sudo mv * /root/bak | |
# 编辑 local.repo 文件 | |
sudo vim local.repo | |
# 输入以下内容 | |
'''' | |
[c7-media] | |
name=Centos-$releasever - Media | |
# ISO文件路径 | |
baseurl=file:///run/media/z/CentOS\ 7\ x86_64 | |
gpcheck=1 | |
enabled=1 | |
gpgkey=file:///run/media/z/CentOS\ 7\ x86_64/RPM-GPG-KEY-CentOS-7 | |
'''' | |
#wq保存 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment