-
-
mkdir /root/guazai
-
-
并将本地磁盘挂载到当前文件夹
-
mount -o loop /dev/cdrom /root/guazai/
-
-
新建文件夹
-
mkdir /mnt/local_yum/
-
-
对文件进行复制
-
cp -r /root/guazai/* /mnt/local_yum/
-
-
修改yum源配置
-
cd /etc/yum.repos.d/
-
将该文件夹下面的文件进行逻辑删除
-
rename .repo .repo.bak *.repo
-
-
-
cp CentOS-Media.repo.bak CentOS-Local.repo
-
vi CentOS-Local.repo
-
[local] name=this is my local yum yuan baseurl=file:///mnt/local_yum gpgcheck=1 enabled=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
-
-
更新yum配置
-
yum clean all
-
yum repolist all
-
-
-
测试yum源安装速度
-
yum install httpd
-