拷贝了一张rhel5的DVD(rhel.5.0.server.centoschina.com.dvd.iso),安装这些都没有问题。但是挂载后,作为光盘的yum库时候,当安装的时候就会报错。这张盘的MD5值和相关安装错误信息如下:
[root@server kook]# md5sum rhel.5.0.server.dvd.iso
9a462d3c60cb219d7017b30ddd1c52cd rhel.5.0.server.dvd.iso
[root@server yum.repos.d]# yum install vsftpd
Loading "rhnplugin" plugin
Loading "installonlyn" plugin
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for vsftpd to pack into transaction set.
media://1170972069.396645%232/vsftpd-2.0.5-10.el5.i386.rpm: [Errno 4] IOError:
Trying other mirror.
Error: failed to retrieve vsftpd-2.0.5-10.el5.i386.rpm from rhel5-Server
error was [Errno 4] IOError:
改造过程:
挂载,重新应用createrepo创新创建库,然后制作DVD。
注意:挂载后,拷贝文件的时候,不要忽略隐藏文件.discinfo
[root@server rhel5]# createrepo -g ~kook/foo/Server/repodata/comps-rhel5-server-core.xml ./Server/
[root@server rhel5]# createrepo -g ~kook/foo/VT/repodata/comps-rhel5-vt.xml ./VT
[root@server rhel5]# createrepo -g ~kook/foo/Cluster/repodata/comps-rhel5-cluster.xml ./Cluster
[root@server rhel5]# createrepo -g ~kook/foo/ClusterStorage/repodata/comps-rhel5-cluster-st.xml ./ClusterStorage/
[root@server rhel5]# mkisofs -r -T -J -V "Custom RHEL5 Build" -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o /home/kook/rhel5.iso /home/kook/rhel5
[root@server rhel5]# /usr/lib/anaconda-runtime/implantisomd5 /home/kook/rhel5.iso
Inserting md5sum into iso image...
md5 = 1c6f42ee4b4ae552a8dd155e60b9fafb
Inserting fragment md5sums into iso image...
fragmd5 = 6d179ebee29483cd86c64e8d3cbfbe47ad881a8e51e9bb576dc1c1ae5e7c
frags = 20
Setting supported flag to 0
[root@server rhel5]# cat .discinfo
1170972069.396645
Red Hat Enterprise Linux Server 5
i386
1,2,3,4,5
Server/base
Server/RPMS
Server/pixmaps
[root@server kook]# md5sum rhel5.iso
6a6001abcfaabba45f1bc564c340f107 rhel5.iso
[root@server kook]# file rhel5.iso
rhel5.iso: ISO 9660 CD-ROM filesystem data 'Custom RHEL5 Build ' (bootable)