Centos7(实验笔记)
Yum本地源
1.挂载Linux安装光盘到目录/mnt/cdrom
[root@centos ~]# mkdir /mnt/cdrom
[root@centos ~]# mount /dev/cdrom /mnt/cdrom
mount: /dev/sr0 is write-protected, mounting read-only
2.创建软件仓库配置文件/etc/yum.repos.d/CentOS.repo
[root@centos ~]# mkdir /etc/yum.repos.d/repo_bak
[root@centos ~]# mv /etc/yum.repos.d/*.repo /etc/yum.repos.d/repo_bak
// 将系统原有的软件仓库配置文件转移到目录/etc/yum.repos.d/repo_bak
[root@centos ~]# vi /etc/yum.repos.d/CentOS.repo
[CentOS]
name=CentOS
baseurl=file:///mnt/cdrom
enabled=1
gpgcheck=1
gpgkey=file:///mnt/cdrom/RPM-GPG-KEY-CentOS-7