interview question and answer

January 10, 2012

How to configure linux yum server step by step guide Example and Implementation

How to configure linux yum server step by step guide Example and Implementation
YUM stands for Yellow dog Updater, Modified because it is based on YUP, the Yellow dog Updater. Yellow Dog is a version of Linux for the Power Architecture hardware. YUP, and later YUM, were written by the Linux community as a way to maintain an RPM-based system.

Advantages of YUM

Automatic resolution of software dependencies. If a package installation or upgrade request is made and requires the installation or upgrade of additional packages, YUM can list these dependencies and prompt the user to install orupgrade them.
Command-line and graphical versionsThe command-line version can be run on a system with a minimal numberof software packages. The graphical versions offer ease-of-use and a user-friendly graphical interface to software management.
Multiple software locations at one time. YUM can be configured to look for software packages in more than one location at a time.
Ability to specify particular software versions or architectures. Software locations accessible by YUM can contain multiple versions of the same RPM package and different builds for different architectures such as one for i686 and one for x86_64. yum can easily check the appropriate version and download it.
While it's unlikely that you'll have an Internet connection during the exam, you could have a network connection to a local repository. So you should be ready to use the yum command during the Red Hat exam.

How to create dump of RHEL CD

Whether you perform network installation or create yum repository file you need dump of RHEL CD. It is generally created on server in RHCE exam. Candidate is given a location of this dump to perform network installation. We will create dump of RHEL CD on /var/ftp/pub and use this for network installation or to create yum repository files.
Check how many space is available on /var partition mimimun 4 GB space is required
var
Now mount RHEL dvd on mnt and copy entire disk on /var/ftp/pub
Dump is created on /var/ftp/pub now you can umount RHEL dvd

Configure yum server

RHCE EXAM QUESTION
Backup of the Redhat Enterprise Linux 5 is taken in /var/ftp/pub on server named Server.example.com. You can install all required packages using yum by creating the repository file.
Pre quest of yum server
we assume that you have completed these pre quest of yum server
  • A Linux system with hostname Server.example.com and with ip address of 192.168.0.254
  • Dump of RHEL disk on /var/ftp/pub location
Once you have completed these pre quests follow this guide.
change directory to /var/ftp/pub/Server
cd Server
yum and createrepo rpm are required for yum server install them
install yum rpm
Now install createrepo rpm
creatrepo
After installing necessary package change directory to /var/ftp/pub
cd pub
Now create repository of Server directory
create repo
repository of all rpm will be created in few minute
create respo
Now create repository for VT
createrepo VT
In few second all necessary repository will be created for VT
createrepo
Now create errata directory and repository for it
errata
During the process of creating repository two hidden directory with named .olddata is created automatically remove them
rm olddata
Now check hostname and change directory to /etc/yum.repos.d. copy sample repository file to the file with hostname And open it
cp repo
Default repository file look like these
vi respo

Remove defaults line and set new location of Sever and VT as shown here
repos
Save file with :wq and exit
Now remove all temporary data file with yum clean all command
yum clean all
Congratulation You have successful create yum server
To test yum server remove telnet package
yum remove telnet
After checking all dependences it will ask for conformation press y
yum remove telnet
Now install telnet package from yum server
yum install telnet
After checking all dependences it will ask for conformation press y
yum install telnet

No comments: