Archive for February, 2008

Red Hat yum mirror

February 26th, 2008 by tripledes

Sabayon Linux
So…you’ve got a bunch of Red Hat servers and need to…save bandwidth? save licenses? or even don’t want your servers go to Internet? Then all you need is to create a yum mirror in order to keep them all up to date ;) .

What do we need?

  • Apache.
  • mrepo.
  • Some management licenses from Red Hat (these are needed if the system where you will hold the repositories is a different release from what you want to mirror.).

Let’s get started…
First we need to locate some space in order to hold all the RPMs we’re going to download, I have created a new logical volume with ~30GiB I hope it’ll be enough to have all the three mirrors I need.

The configuration for mrepo is found at /etc/mrepo.conf and will look like:

[main]
srcdir = /mrepo
wwwdir = /mrepo/www
confdir = /etc/mrepo.conf.d
arch = x86_64
mailto = root@localhost
smtp-server = localhost
rhnlogin = username:password

[rhel5es]
name = Red Hat Enterprise Linux $release Server ($arch)
release = 5
arch = i386
iso = rhel-$release-server-$arch-disc?.iso rhel-5.1-server-$arch-dvd.iso
metadata = repomd
updates = rhns:///rhel-$arch-server-$release
rpmforge = http://apt.sw.be/redhat/el5/en/$arch/RPMS.dag/

[4ES]
name = Red Hat Enterprise Linux ES $release Update 6 ($arch)
release = 4
arch = x86_64
iso = RHEL$release-U6-$arch-AS-disc?.iso
metadata = yum repomd
updates = rhns:///rhel-$arch-es-$release
rpmforge = http://apt.sw.be/redhat/el4/en/$arch/RPMS.dag/

[3ES]
name = Red Hat Enterprise Linux ES $release Update 9 ($arch)
release = 3
arch = i386
iso = rhel-$release-u9-$arch-as-disc?.iso
metadata = yum repomd
updates = rhns:///rhel-$arch-es-$release
rpmforge = http://apt.sw.be/redhat/el3/en/$arch/RPMS.dag/

The main section configures the environment for the local machine which will hold the mirrors, each of the next sections define the parameters for each release we’ll mirror. (Remember by now you should have installed mrepo, rpm -ivh mrepo-blahblah.rpm).

Once here, we need to create all the system identifications required for Red Hat to access to its repositories:
# gensystemid -u RHN_user -p RHN_password --release=3ES --arch=i386 /mrepo/3ES-i386/
# gensystemid -u RHN_user -p RHN_password --release=4ES --arch=x86-64 /mrepo/4ES-x86-64/
# gensystemid -u RHN_user -p RHN_password --release=5Server --arch=i386 /mrepo/rhel5es/

Now let’s suck from Red Hat:
# mrepo -ugvv (For getting everything)
# mrepo -ugvv repo_name (For just one repository)

The isos aren’t really needed but if you provide them will save some time to set up the mirrors. At this time we should configure our web server to allow clients access to repositories, I have created a virtual host called yum.domain.tld and looks like:

<VirtualHost *:80>
ServerName yum.domain.tld
DocumentRoot /mrepo/www
ServerAdmin admin@domain.tld
<Directory "/mrepo/www">
Options Indexes FollowSymlinks SymLinksifOwnerMatch IncludesNOEXEC
IndexOptions NameWidth=* DescriptionWidth=*
HeaderName HEADER.shtml
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/httpd/error_yum.log
CustomLog /var/log/httpd/access_yum.log combined
</VirtualHost>

To finish this configuration we need to set up clients, we’ll install yum and its dependencies (python-elementtree, python-sqlite, python-urlgrabber and sqlite), all can be found at Dag’s repository and configuration for our repository will be found in /etc/yum.repos.d/, it has to be called something.repo and will look like this:

[name]
name = Red Hat Enterprise $releasever
baseurl = http://yum.domain.tld/4ES-x86_64/RPMS.updates
enabled = 1
protect = 0
gpgcheck = 0

Once saved, just updating is needed:
# yum update

Well, that’s all…hope this will be useful!

UPDATE: I was having problems with 3ES servers asking for header.info file, they couldn’t find it on the mirror, after some messing around I did notice I haven’t had installed yum on the server, installing it solved the issue and now everything is working flawlessly.

Tags: , , , ,

Sabayon: E17!

February 7th, 2008 by tripledes

Sabayon LinuxIt’s been some time since I tried previous versions of Enlightenment, since then I have heard lots of good things about its 0.17 version (E17), so yesterday I decided to check it out.

Getting it installed on my Sabayon was easy thanks to Gentoo’s overlays. The process starts as follows:

# layman -a enlightenment


# emerge -Dpv e entrance

Here you can personalize your USE to fit your preferences…

# emerge -Dv e entrance

Then you’ll have to change your graphical login manager in /etc/conf.d/xdm:

DISPLAYMANAGER="entrance"

Reboot it and you’re done! :)

# /etc/init.d/xdm restart

Next time you login remember to select Enlightenment from session chooser ;)

Tags: , , ,