标签:
[root@server3 ~]# mount -t iso9660 /dev/cdrom /mnt
mount: block device /dev/cdrom is write-protected, mounting read-only
[root@server3 mnt]# cd /etc/yum.repos.d/
[root@server3 yum.repos.d]# ls
CentOS-Base.repo CentOS-Debuginfo.repo CentOS-Media.repo CentOS-Vault.repo
CentOS-Base.repo : 是网络源,默认使用,要想使用本地源的话,需要把这个文件名修改或者删除CentOS-Media.repo : 是本地源的配置
[c6-media]
name=CentOS-$releasever - Media
baseurl=file:///mnt/
file:///media/CentOS/
file:///media/cdrom/
file:///media/cdrecorder/
gpgcheck=0
enabled=1
#gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
[root@server3 yum.repos.d] yum clean all
[root@server3 yum.repos.d] yum makecache
[root@server3 yum.repos.d] yum install samba
标签:
原文地址:http://www.cnblogs.com/jiangyong/p/4823466.html