1. Backing Up/etc/yum.repos.d/files
[Email protected] ~]# cp-r/etc/yum.repos.d//etc/yum.repos.d.bak
[Email protected] ~]# ls/etc/yum.repos.d*-D
/etc/yum.repos.d/etc/yum.repos.d.bak
2. Delete the system network Yum file
[Email protected] ~]# Rm-rf/etc/yum.repos.d/centos-base.repo
[email protected] ~]# Yum repolist
Loaded Plugins:fastestmirror
Loading mirror speeds from cached hostfile
repolist:0
3. Create a local Yum source configuration file
[Email protected] ~]# Vim/etc/yum.repos.d/cdrom.repo
[CDROM]
Name=cdrom
Baseurl=file:///mnt/cdrom
Gpgcheck=0
Enable=1
4. Virtual Machine Connection DVD, Mount Optical Drive
[Email protected] ~]# Mkdir/mnt/cdrom
[Email protected] ~]# mount/dev/sr0/mnt/cdrom/
Mount:block Device/dev/sr0 is write-protected, mounting read-only
5. List the Yum repositories
[email protected] ~]# Yum repolist
650) this.width=650; "src=" http://s1.51cto.com/wyfs02/M01/77/0F/wKiom1ZhpQrxbDRhAAAoV7yz1JY268.jpg "title=" 20.jpg "alt=" Wkiom1zhpqrxbdrhaaaov7yz1jy268.jpg "/>
[email protected] ~]# Yum Install Samba
650) this.width=650; "src=" http://s4.51cto.com/wyfs02/M02/77/0F/wKiom1ZhpzHyogMxAAJOkaBK6zk129.jpg "title=" 21.jpg "alt=" Wkiom1zhpzhyogmxaajokabk6zk129.jpg "/>
1.2centos6.5 Local Yum Source configuration