歡迎您光臨本站 註冊首頁

配置本地光碟做yum源的問題,求教ing

←手機掃碼閱讀     火星人 @ 2014-03-25 , reply:0

本人菜鳥,如題,做法如下,問題baidu了許久沒有解決,請各位看看問題如何解決
把光碟載入到本地

[root@localhost CentOS]# mount /dev/cdrom /media

在/etc/yum.repos.d/目錄下,有兩個文件

註釋CentOS-Base.repo,修改
CentOS-Media.repo:


# CentOS-Media.repo
#
# This repo is used to mount the default locations for a CDROM / DVD on
# CentOS-5. 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=c5-media [command]
#
# or for ONLY the media repo, do this:
#
# yum --disablerepo=\* --enablerepo=c5-media [command]
[c5-media]
name=CentOS-$releasever - Media
baseurl=file:///media/CentOS/

gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-beta
-------------------------------------------------------
執行命令yum --enablerepo=c5-media install vsftpd,提示為:

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
file:///media/CentOS/repodata/repomd.xml: [Errno 5] OSError: [Errno 2] No such file or directory: '/media/CentOS/repodata/repomd.xml'
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: c5-media. Please verify its path and try again


搜索后,有教程說要配置createrepo,安裝后執行
createrepo -g /media/repodata/repomd.xml /media/CentOS/命令,建立包依賴關係庫,但報錯Directory /media/CentOS must be writable.
可是/media/CentOS是光碟本身的目錄,是只讀的,不能改屬性吧,但改變目錄,如執行:createrepo -g /media/repodata/repomd.xml /root,就不報錯,但仍然無法yum安裝,不知道問題在哪裡了

[火星人 ] 配置本地光碟做yum源的問題,求教ing已經有256次圍觀

http://coctec.com/docs/linux/show-post-158777.html