How to configure YUM Server in RHEL6
In this tutorial we will configure yum server in RHEL6 with local repository. YUM is a software package manager used for RPM management. YUM make it easier to install, update and remove RPM.
- YUM stand for Yellowdog updater modified
- YUM is based on YUP which stand for Yellowdog Updater
- YUM is developed to maintain an RPM-based system
- By default YUM server use online repository
- YUM can be configure to look for a RPM in multiple location
- Repository may contain multiple versions of the same RPM package
- Repository may contain different builds for different architectures for example one for i686 and other for x86_64
- Internet access is not available during the RHCE 6 exam
- YUM server allow you to create local repository
- During the exam you could have a connection to local repository
- Use YUM to install and remove RPM wherever possible during the exam
- YUM automatically resolve software dependencies
- YUM can automatically search for appropriate version of RPM
- YUM can automatically detect appropriate architectures
- Above three features of YUM can save a lot of time during the exam
In this tutorial I will use two systems Server and linuxclient from our LAB environment. I will configure YUM Server on Server system and yum client on linuxclient system. If you want to check the network topology used in this article please check following article. Lab set up for RHCE 6 practice.
Configure YUM Server in RHEL 6
During this process we will copy the entire DVD of RHEL 6, so make sure that you have sufficient space on root directory
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.
Check vsftpd RPM and service. (Skip if you want to use other directory)
Make directories yum/rhel6/repodata in the folder which you have chosen for repository.
For FTP server it would be /var/ftp/pub folder
Copy all RPM from RHEL 6 DVD located in Packages folder to /var/ftp/pub/yum/rhel6/repodata
Copy main xml file to our repodata folder. (Required for group installation)
Three RPM are required for YUM Server.
- deltarpm
- python-deltarpm
- createrepo
We have copied All RPM from DVD to repodata directory. Now we can install RPM directly from repodata folder.Change directory torepodata
Install any missing RPM.
Verify that we have all necessary RPM
Change directory to /var/ftp/pub/yum/rhel6
Generate local repository files from repodata folder [ repodata folder :- which contain all RPM copied from RHEL6 DVD] to current folder [rhel6]
Create new server.repo file
To point local repository set following values and save the file
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.
yum makecache is used to download and make usable all the metadata for the currently enabled yum repository.
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
yum grouplist will list all package groups from all the repositories configured
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.
Open main configuration file of FTP server
Uncomment anonymous_enable directives and save the file
Configure iptable rule to allow FTP connection
Configure SELinux Boolean
Restart the vsftpd service
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
Check connectivity from server
Check anonymous login
Create a new file /etc/yum.respo.d/client.reop file
Set following value and save the file
Clean all cache
Make new cache
To test list all packages
List all group packages
To do more testing install squid package
We have successfully configured yum client.
source : http://computernetworkingnotes.com/network-administration/how-to-configure-yum-server-in-rhel6.html
No comments:
Post a Comment