Configure YUM Server on RHEL

 

Yum-Repositories

 

 

1. During this process we will copy the entire DVD of RHEL 6, so make sure that you have sufficient space on root directory

12

 

2. Insert RHEL 6 DVD and mount it in media folder

13

 

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)

14

 

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

15

 

5. Copy all RPM from RHEL 6 DVD located in Packages folder to /var/ftp/pub/yum/rhel6/repodata

16

 

6. Copy main xml file to our repodata folder. (Required for group installation)

17

 

7. Three RPM are required for YUM Server.

18

 

8. We have copied All RPM from DVD to repodata directory. Now we can install RPM directly from repodata folder.Change directory torepodata

19

 

9. Install any missing RPM.

20

 

10. Verify that we have all necessary RPM

21

 

11. Change directory to /var/ftp/pub/yum/rhel6

22

 

12. Generate local repository files from repodata folder [ repodata folder :- which contain all RPM copied from RHEL6 DVD] to current folder [rhel6]

23

 

13. Create new server.repo file

24

 

14. To point local repository set following values and save the file

25

 

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.

26

 

16. yum makecache is used to download and make usable all the metadata for the currently enabled yum repository.

27

 

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

28

 

18. yum grouplist will list all package groups from all the repositories configured

29

 

19. Test Yum server by installing squid [RPM required for squid proxy server]

30

 

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

31

 

21. Uncomment anonymous_enable directives and save the file

32

 

22. Configure iptable rule to allow FTP connection

33

 

23. Configure SELinux Boolean

34

 

24. Restart the vsftpd service

35

 

25. Note down the IP address of server

36

 

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

37

 

27. Check anonymous login

38

 

28. Create a new file /etc/yum.respo.d/client.reop file

39

 

29. Set following value and save the file

40

 

30. Clean all cache

41

 

31. Make new cache

42

 

32. To test list all packages

43

 

33. List all group packages

44

 

34. To do more testing install squid package

45

We have successfully configured yum client

22 Comments

Add a Comment

Your email address will not be published. Required fields are marked *