1、挂载光驱
# mount -o loop -t iso9660 /home/vmware/rhel-server-6.0-x86_64-dvd.iso /mnt
2、安装createrepo软件包 ——>这是一个解决依赖性的工具
# cd /mnt/Server/Packages
# rpm -ivh createrepo*
warning: createrepo-0.9.8-4.el6.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
error: Failed dependencies:
deltarpm is needed by createrepo-0.9.8-4.el6.noarch
python-deltarpm is needed by createrepo-0.9.8-4.el6.noarch
[root@localhost Packages]# find -name deltarpm*
./deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm
[root@localhost Packages]# rpm -ivh deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm
warning: deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing... ########################################### [100%]
1:deltarpm ########################################### [100%]
[root@localhost Packages]# find -name python-deltarpm*
./python-deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm
[root@localhost Packages]# rpm -ivh python-deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm
warning: python-deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing... ########################################### [100%]
1:python-deltarpm ########################################### [100%
[root@localhost Packages]# rpm -ivh createrepo*
warning: createrepo-0.9.8-4.el6.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing... ########################################### [100%]
1:createrepo ########################################### [100%]
3、拷贝系统盘中的文件本系统中
# cp -R /mnt/* /home/yum_yww/
4、生成依赖性关系
# createrepo -g /home/yum_yww/Server/repodata/1a7fc54d30d0d44222742c63069ab0126afef9f160931cc15e564dbe6414f268-comps-rhel6-Server.xml /home/yum_yww/Server/
278/3431 - Packages/openmotif-2.3.3-1.el6.i686.rpm
iso-8859-1 encoding on Ville Skytt?
- 2.8.2-2
3431/3431 - Packages/wacomexpresskeys-0.4.2-3.el6.x86_64.rpm
Saving Primary metadata
Saving file lists metadata
Saving other metadata
5、创建yum仓库配置文件
# cd /etc/yum.repos.d/
# touch yww.repo
# vim yww.repo
[base]
name=yww
baseurl=file:///home/yum_yww/Server
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
6、更新缓存
# yum clean all
# yum list
阅读(700) | 评论(0) | 转发(0) |