1. During this process we will copy the entire DVD of RHEL 6, so make sure that you have sufficient space on root directory
2. Insert RHEL 6 DVD and mount it in media folder
RHCE 6 exam cover Anonymous only download for FTP server so in this tutorial we will store repository on a local FTP server, you can choose any other directory like /opt as per your need.
For this article I assume that you have configured FTP server. You can check our previous article for FTP server.
3. Check vsftpd RPM and service. (Skip if you want to use other directory)
4. Make directories yum/rhel6/repodata in the folder which you have chosen for repository.
For FTP server it would be /var/ftp/pub folder
5. Copy all RPM from RHEL 6 DVD located in Packages folder to /var/ftp/pub/yum/rhel6/repodata
6. Copy main xml file to our repodata folder. (Required for group installation)
7. Three RPM are required for YUM Server.
8. We have copied All RPM from DVD to repodata directory. Now we can install RPM directly from repodata folder.Change directory torepodata
9. Install any missing RPM.
10. Verify that we have all necessary RPM
11. Change directory to /var/ftp/pub/yum/rhel6
12. Generate local repository files from repodata folder [ repodata folder :- which contain all RPM copied from RHEL6 DVD] to current folder [rhel6]
13. Create new server.repo file
14. To point local repository set following values and save the file
15. During its normal use yum creates a cache of metadata and packages. This cache can take up a lot of space. yum clean all command allows you to clean up these files.
16. yum makecache is used to download and make usable all the metadata for the currently enabled yum repository.
17. yum list all will list all packages from all the repositories configured. With this it will also list all the packages installed on your system
18. yum grouplist will list all package groups from all the repositories configured
19. Test Yum server by installing squid [RPM required for squid proxy server]
We have successfully configured YUM server with local repository. But client system will not be able to access this repository yet. We need to configure FTP server for anonymous download. We have already configured FTP server in our previous article so in this article we are going to include only those steps which required for YUM setup. Check our previous article for detailed explanations of FTP server.
20. Open main configuration file of FTP server
21. Uncomment anonymous_enable directives and save the file
22. Configure iptable rule to allow FTP connection
23. Configure SELinux Boolean
24. Restart the vsftpd service
25. Note down the IP address of server
That’s all setting we need on server system now go on linuxclient system.
Configure YUM client system in RHEL6
26. Check connectivity from server
27. Check anonymous login
28. Create a new file /etc/yum.respo.d/client.reop file
29. Set following value and save the file
30. Clean all cache
31. Make new cache
32. To test list all packages
33. List all group packages
34. To do more testing install squid package
We have successfully configured yum client