Note: Make sure to check the conventions I use before going through the tutorial.
Creating your own private yum repository is useful especially if you wish to conserve bandwidth or you have your own packages you wish to distribute through yum (I used it for my class since Internet access it always available). Creating one in Fedora is fairly straight-forward.
Step 1 (server side): Log in as root and install the necessary packages (these can also be found on your F9 DVD or iso) , and start the httpd service.
# yum -y install createrepo httpd
# rpm -q createrepo httpd
# service httpd start
# chkconfig --level 35 httpd on
Step 2 (server side): Log in as root and assuming that you've already downloaded the official Fedora 9 iso image, then mount the iso and copy the rpm packages in iso image to your Apache directory.
# mkdir /var/www/html/f9repo
# mkdir /mnt/iso
# mount -o loop Fedora-9-i386-DVD.iso /mnt/iso
# cp -av /mnt/iso/Packages/* /var/www/html/f8repo
# cd /var/www/html/f9repo
# createrepo -v .
# service httpd restart
Note: You can also check your yum repo via web by visiting http://localhost/f8repo
Step 3 (client side): Log in as root, and create private.repo file to point your Fedora 9 client to the local yum repository server.
# cd /etc/yum.repo.d/
# vi private.repo
[LocalRepo]
name=Local Yum Repository
baseul=http://192.168.0.2/f9repo
enabled=1
gpgcheck=0
Note: For testing purposes, also edit /etc/yum.repo.d/fedora.repo file. Look for "enabled=1" and change it to "enabled=0". This would disable yum from fetching packages from Fedora repository (Internet).
Step 4: Log in as root and test your local yum repository. By default, 'nano' text editor is installed. Remove this package and try to install them again.
# yum -y remove nano
# yum -y install nano
Note: You should see a message where is getting it's package from the LocalRepo.
Optional package I find useful on the client side (but you need to download the Internet):
# yum -y install yumex yum-fastestmirror yum-skip-broken
I hope you find this post "Creating Yum Repository on Fedora 9" useful!
Thursday, September 4, 2008
Subscribe to:
Post Comments (Atom)

No comments:
Post a Comment