Yum configuration on linux 6


1. Mount the rhel dvd go to the Packege directory
2. Then install ftp rpm # rpm –ivh vsftpd-2
3. Install creatrepo rpm # rpm –ivh creatrepo -0
4. Install deltarpm # rpm –ivh deltarpm
5. Install python-deltarpm-3 # rpm –ivh python-deltarpm
6. Then back to the parent directory # cd ..
7. Make a directory in the pub # mkdir /var/ftp/pub/dvd
8. Copy the entire rhel dvd to /pub/dvd directory # cp * -Rv /var/ftp/pub/dvd
9. Then go to the /pub/dvd directory # cd /var/ftp/pub/dvd
10. Make repository file in a group link # createrepo –g /var/ftp/pub/dvd/Server/repodata then
press 2 tab and focous on the Server.xml line and copy this line # createrepo –g
/var/ftp/pub/dvd/Server/repodata –o (not zero) /var/ftp/pub/dvd/Server/
/var/ftp/pub/dvd/Packages
11. Then go to the yum.repos.d # cd /etc/yum.repos.d
12. Show all in this yum.repos.d directory # ls
13. Copy source.repo and pest here as demo.repo or example.repo # cp rhel-source.repo
demo.repo
14. Edit the demo.repo # vim demo.repo
[server]
Baseurl = ftp://192.168.0.254/pub/dvd/Server
ftp://192.168.0.254/pub/dvd/Packages
enable=1
gpgcheck=1
15. Start the ftp server # service vsftpd start
16. Clean all temp on yum repo file # yum clean all
17. Show the repolist # yum repolist

Comments

Popular Posts