分类:
2011-07-30 14:21:45
I have a RHEL5 DVD but it is difficult to install a package using rpm because I need to manually add all dependent packages. Here is now I create a Yum reposiroty so that I can use yum to install these packages. Note that the DVD is automatically mounted as /media/RHEL_5.1 x86_64 DVD.
> cd /media/RHEL5_5.1\\ x86_64\\ DVD/Client
> rpm -ihv createrepo-0.4.4-2.fc6.noarch.rpm
> cd /home/blah/some_dir
> createrepo -vpo /home/blah/some_dir /media/RHEL5_5.1\\ x86_64\\ DVD
> cd /home/blah/some_dir
> ln -s /media/RHEL5_5.1\\ x86_64\\ DVD/Client Client
> ln -s /media/RHEL5_5.1\\ x86_64\\ DVD/Workstation Workstation
Then create a file /etc/yum.repos.d/DVD.repo with the following content
[dvd]
name=RHEL4 DVD
baseurl=file:///home/blah/some_dir
enabled=1
gpgcheck=0
Run
> yum clean all
> yum update
and you are done.