Hello guys,
Before going to Configure Yum you have to know that What is Yum.
What is Yum ?Yum or Yellow dog Updater Modified is a package manager that was developed by Duke University to improve the installation of RPMs.
How to configure Yum ?The configuration file for yum is located at /etc/yum.conf and it is recommended to define individual repositories in new or existing .repo files in the /etc/yum.repos.d/directory.
To define individual repositories you have to create repository for it.
How to create repository ?Mount the OS disk and copy the contents to a local path or you can also try with the mirror system.
Copy all of the packages into one directory, such as /var/ftp/pub or any other directory which you wish.
Run the
createrepo command on that directory.
Quote#createrepo /var/ftp/pub
Now you can configure to Yum.
Quote# vi /etc/yum.repos.d/server.repo
[server]
name=myrepo
baseurl=file:///var/ftp/pub/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
Save and quit the file.
Now you can check with the
yum repolist command, this command show the repolist on your server.
Quote# yum repolist
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
* base: mirror.ash.fastserv.com
* extras: mirror.umd.edu
* updates: mirror.symnds.com
atrpms | 3.5 kB 00:00
repo id repo name status
atrpms myrepo 2,702+10
Hey configuration of Yum has been completed. You can now install the packages which you want, just use the following commad.
How to install the Apache Web Server Package.
Quote#yum install httpd
You can also install different different packages e.g PHP, Perl, Bind, etc.
Enjoy ....!!!