Tuesday, October 28, 2008

Create Yum Repositories

YUM stands for Yellow Dog Updater, Modified is a tool used to handle package management linux distribution.
You may never have dependencies on other packages when you want to install an rpm package. You then have to install one by one package which may also have individual dependencies on other packages again. Well, here's where you need yum to work for you, simply type:


yum install


Voila, all dependencies resolved. Installation went smoothly with only a single command.
Well, suppose you have just installed a linux system with a minimalist package because of limited space or you want a slim server. Say you as a developer so you simply install the development packages, editor and http packets, and then decides to make Yum repositories at one another webserver to be able to add the package at a later time using Yum.

Langkah-langkah yang bisa anda lakukan untuk membuat Yum repositories:

- make a directory where the files will be saved rpm distribution. For example your web server's document root is / var / www / html:
  • cd /var/www/html
  • mkdir -p rhel5/Server

- copy the contents of the CD RHEL5 rpm
  • cp /mnt/cdrom/Server/*.rpm rhel5/Server

- download source application createrepo from http://createrepo.baseurl.org/download/, direct install:
  • rpm --rebuild createrepo-0.4.11-1.src.rpm
  • rpm -ivh /usr/src/redhat/RPMS/noarch/createrepo-0.4.11-1.noarch.rpm

- enter the directory / var/www/html/rhel5/Server and run createrepo
  • cd /var/www/html/rhel5/Server
  • createrepo .

- Yum repositories ready

Return to your new Linux system pre-installed, create the file /etc/yum.repos.d/RHEL-os.repo. Example configuration (adjust to your conditions):

[rhel-os]
name=Red Hat Enterprise Linux OS
baseurl=http://10.10.10.10/rhel5/Server/
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

Good luck

No comments: