Skip to main content

Creating YUM Repository Server

When it comes to installing yum repository server there are some requirements:
  • Instalattion tree (can be extracted from linux distribution dvd)
  • YUM repository
  • Network service that is hosting repository and packages. (can be http or ftp server)
I use http for hosting repository. In the apache.conf

DocumentRoot "/var/www/html"

Copy installation tree from dvd iso
# mount -o loop /redhatisos/rhel-server-5.7-x86_64-dvd.iso /mnt/dvdrom
# cd /mnt/dvdrom
# cp -fr * /var/www/html/5.7-x86_64/
# cd /var/www/html/5.7-x86_64

Create yum repository with the following command
# createrepo -o /var/www/html/rhrepos/5.7-x86_64 .

Then go to client and test yum
# vi /etc/yum.repos.d/my.repo

name= RHEL Server Repository 
baseurl=http://<server name>/5.7-x86_64

# yum clean all
# yum list


Popular posts from this blog

Find and replace with sed command in Linux

Find and replace feature is always handy. It can turn into a torture when it comes to change or delete a simple constant string in a text file. There is a handy tool in linux for doing these kind of tihngs. Actually sed is not a text editor but it is used outside of the text file to make changes.