Tuesday , 19 March 2019
Breaking News

Step by Step Yum server setup

1. #rpm -ivh vsftpd
2. #rpm –ivh createrepo    <= Please install this rpm to create xml files
3. #mount /dev/cdrom /mnt
4. #cp –vrf /mnt/* /var/ftp/pub
5. #cp /var/ftp/pub/Server/repodata/comps-rhel5-server-core.xml /tmp
6. #cp /var/ftp/pub/Cluster/repodata/comps-rhel5-cluster.xml /tmp
7. #cp /var/ftp/pub/ClusterStorage/repodata/comps-rhel5-cluster-st.xml /tmp
8. #cp /var/ftp/pub/VT/repodata/comps-rhel5-vt.xml /tmp
9. #rm –rf /var/ftp/pub/Server/repodata
10. # rm –rf /var/ftp/pub/Cluster/repodata
11. #rm –rf /var/ftp/pub/ClusterStorage/repodata
12. #rm –rf /var/ftp/pub/VT/repodata
13. #createrepo –v /var/ftp/pub/Server
14. #createrepo –v /var/ftp/pub/Cluster
15. #createrepo –v /var/ftp/pub/ClusterStorage
16. #createrepo –v /var/ftp/pub/VT
 NOTE#rm –rf /var/ftp/pub/Server/.olddata  do the same for Cluster/ClusterStorage/VT dir
17. #vi /etc/yum.repos.d/server.repo
 [Server]
 name=RHEL5.1
 baseurl=ftp://<ftp server IP>/var/ftp/pub/Server
 gpgcheck=0
 [ClusterStorage]
 name=RHEL5.1
 baseurl=ftp://<ftp server IP>/var/ftp/pub/ClusterStorage
 gpgcheck=0
 [Cluster]
 name=RHEL5.1
 baseurl=ftp://<ftp server IP>/var/ftp/pub/Cluster
 gpgcheck=0
 [VT]
 name=RHEL5.1
 baseurl=ftp://<ftp server IP>/var/ftp/pub/VT
 gpgcheck=0
18. #cp /tmp/comps-rhel5-server-core.xml /var/ftp/pub/Server/
19. #cp /tmp/comps-rhel5-cluster.xml /var/ftp/pub/Cluster/
20. #cp /tmp/comps-rhel5-cluster-st.xml /var/ftp/pub/ClusterStorage/
21. #cp /tmp/comps-rhel5-vt.xml /var/ftp/pub/VT/
22. #cd /var/ftp/pub/Server
23. #createrepo –g comps-rhel5-server-core.xml . (dot)
24. #cd /var/ftp/pub/Cluster
25. #createrepo –g comps-rhel5-cluster.xml . (dot)
26. #cd /var/ftp/pub/ClusterStorage
27. #createrepo –g comps-rhel5-cluster-st.xml . (dot)
28. #cd /var/ftp/pub/VT
29. #createrepo –g comps-rhel5-vt.xml . (dot)
Now try running Yum commands:
30. #yum list
 baseurl=file:///var/ftp/pub/Server   <= This line applies only when Yum server itself is a yum client

Check Also

Lorem ipsum dolor sit amet

Diam wisi quam lorem vestibulum nec nibh, sollicitudin volutpat at libero litora, non adipiscing. Nulla …

Leave a Reply