Saturday, May 24, 2008

How to setup local Yum repository in Fedora 8

The advantage of running a local repository is to save bandwidth. With this method you can distribute RPMs across your network from a central server and only worry about keeping your server in sync with the other Fedora mirrors.

1) Install Apache web server: yum install httpd and start it: /etc/init.d/httpd start
2) Install a tool to index your repo: yum install createrepo
3) Now is the time to download the Fedora repository. If you have the install DVD you can copy the contents from there, however it only contains a limited set of packages. If you want everything then download it from a good mirror server.

In this case I used rsync but you can also use http or ftp protocol and download using wget command.

rsync -avrt rsync://rsync.muug.mb.ca/fedora-enchilada/linux/releases/8/Everything/i386/os/Packages/ /var/www/html/yum/base/8/i386

The RPMs will be located in your apache web root folder /var/www/html/yum/base/8/i386

4) Index the repo: createrepo /var/www/html/yum/base/8/i386
5) Now we need to tell yum to use the local repo. Edit the yum.conf file: nano /etc/yum.conf and append this information:

[base-local]
name=Fedora 8 - i386
failovermethod=priority
baseurl=http:///yum/base/$releasever/$basearch
enabled=1
gpgcheck=0

6) To confirm that we have everything setup run these commands:

yum repolist
output:

repo id repo name status
base-local Fedora 8 - i386 enabled
fedora Fedora 8 - i386 enabled
livna Livna for Fedora Core 8 - i386 - Base enabled
updates Fedora 8 - i386 - Updates enabled


base-local is enabled and we can now start using it.

Lists all imported packages on the local repo.
yum list all --disablerepo=fedora,updates,livna

Installs liferea from the local repo. Note that if you don't disable the internet repo and yum finds a later version of liferea online it will try to download that instead.

yum install liferea --disablerepo=fedora,updates,livna

Thursday, May 22, 2008

I am back

I have not abandoned my dear blog, just been really busy at work.
I have had the time to play with FLOSS on a regular basis, here is the break down of some of the things I did last few months.

*Played around with a wiki engine called TWiki. I have beat this one to death and now I am quiet comfortable using/configuring it. In terms of installation it is much harder as compared to mediawiki. The engine itself is Perl based and requires some CPAN modules to be installed. Link to TWiki page on matrix Here.

*Tried the new version of Ubuntu (v.8.04), Pros: Neat that they enable compiz by default. Interesting approach installing Linux with Wubi. New GNOME 2.22 :)
Cons: Seen some bugs when turning of compiz, my windows appear in the background, maybe related to Xorg or the window manager itself. Wubi didn't seem to work for me, installed using traditional approach.

*Installed Fedora 9 on my system. Pros: PackageKit Cons: latest nvidia driver does not work with included Xorg. I think I''ll stick with Fedora 8 for now.

*Playing a lot with bash scripting lataly