准备阶段
1.查看系统版本
[root@centos73-1611 ~]# cat /etc/redhat-release
CentOS Linux release 7.3.1611 (Core)
2.下载与系统版本一致的 iso 镜像 http://mirror.nsc.liu.se/centos-store/
配置 yum 本地源
1.准备挂载路径 mkdir /mnt/iso
2.挂载 iso 镜像
[root@centos73-1611 xqzhang]# mount CentOS-7.3-x86_64-DVD-1611.iso /mnt/iso
mount: /dev/loop0 is write-protected, mounting read-only
3.添加本地源 vim CentOS-Media.repo
# CentOS-Media.repo
#
# This repo can be used with mounted DVD media, verify the mount point for
# CentOS-7. You can use this repo and yum to install items directly off the
# DVD ISO that we release.
#
# To use this repo, put in your DVD and use it with the other repos too:
# yum --enablerepo=c7-media [command]
#
# or for ONLY the media repo, do this:
#
# yum --disablerepo=\* --enablerepo=c7-media [command]
[c7-media]
name=CentOS-$releasever - Media
baseurl=file:///media/CentOS/
file:///media/cdrom/
file:///media/cdrecorder/
file:///mnt/iso/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
增加本地源 file:///mnt/iso/
,修改 enabled=1
4.重建 yum 缓存
yum clean all
yum makecache
测试
yum install ftp
欢迎来到这里!
我们正在构建一个小众社区,大家在这里相互信任,以平等 • 自由 • 奔放的价值观进行分享交流。最终,希望大家能够找到与自己志同道合的伙伴,共同成长。
注册 关于