Archive for the ‘linux’ Category

CentOS 6.2

If you want to upgrade from CentOS 6.0 or 6.1, all you need to do is run “yum update” as root, and then reboot.  The reboot is required because the kernel is updated.

If you have CentOS 5.x or 4.x, then there is no path for you to update.  For the adventurous, you can certainly get it to work, but you’ll be in for some pain.  Check the release notes for some ideas on where to start:

The new installer in the 6.x release is a little easier to use, and the boot times are certainly much better.

If you use netinstall, then the URL containing the centos installation image for 64bit is:

And if for some crazy reason you are still using 32bit:

I’m a little at a loss as to why these URL’s aren’t in the installer by default.

have fun,



finally! Here is the post from Karinbar:

congrats to all the guys who made that happen. Certainly seemed to be a bit trickier than last time.
It might not be too long before 6.1 also comes out, so if you are thinking of a major upgrade, you might consider waiting (although 6.0 will upgrade automatically anyway).


We are going to build gimp from the directory $HOME/gimp/2.7.1 and install it into $HOME/gimp-2.7.1 or /opt/gimp-2.7.

Installing to my home directory allows me to have multiple copies of the gimp, and run which ever version that I want. So my tree actually looks something like this:
(my build files)
(the install area)

Step 1. Start with a clean install of Ubuntu.

Of course you don’t need to do that, but I thought it was a great place to start. I did this by installing a version of 10.04 LTS Ubuntu 64bit on a Sun VirtualBox VM. If you don’t know what I just said, then just start with Ubuntu 10.04.

Step 2. Download the dependencies.

sudo apt-get install gettext libglib2.0-0 libglib2.0-dev \
    libgtk2.0-dev ruby intltool libtiff4-dev python-gtk2-dev \
    libjasper-dev libexif-dev libmng-dev liblcms1-dev \
    libxpm-dev librsvg2-dev libwmf-dev libasound2-dev \
    libdbus-glib-1-dev libaa1-dev libwebkit-dev libhal-dev \

Step 3. Download the source files that we need to install.

mkdir -p gimp/2.7.1/
cd gimp/2.7.1
tar xf babl-0.1.2.tar.bz2
tar xf gegl-0.1.2.tar.bz2
tar xf gimp-2.7.1.tar.bz2

Step 4. Pick somewhere to install

Now here we can choose where we want to install. The default is /usr/local/. (ie PREFIX=/usr/local), however that is known to cause problems. Personally, I want to have the installations and libraries seperate for each version, so that I can run whatever version of gimp that I want, so I’ll use PREFIX=$HOME/gimp-2.7.1. If you want to install system wide then use PREFIX=/opt/gimp-2.7.


Step 5. Start the build

You need “sudo make install” below if installing to /opt.

export PATH=$PREFIX/bin:$PATH
export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig

cd babl-0.1.2
./configure --prefix=$PREFIX
make install

cd ../gegl-0.1.2
./configure --prefix=$PREFIX
make install

cd ../gimp-2.7.1
./configure --prefix=$PREFIX
make install

Step 6. Run the program

Now you can run gimp as:


The documention for /etc/cron.d files says that it’s the same as /etc/crontab. And although this is true, most people are not used to adding the user in as the first argument before the script.

So when you use crontab -e:

10 * * * * /opt/myprog

When you put it in /etc/cron.d/myapp.crontab

10 * * * * root /opt/myprog

It’s a little annoying, and a comment in the documention as such would go a long way.


You can use msgset to set the size of the message queue, but the easiest way is to just set it on the kernel directly.

The default size is 64k. So here I set it to around 1Meg.

As root run:

echo 1000000 > /proc/sys/kernel/msgmnb

(I added to /etc/rc.d/rc.local on CentOS 5.5)

and you can check it with:

cat /proc/sys/kernel/msgmnb

To complete the story, I ran into this problem when I had hundreds of clients simultaneously trying to write to a full queue, and a server trying to read from it. For reasons I didn’t investigate, the server would see the queue as empty, even though it had 11 messages in the queue (use command: ipcs).

So for me, this is a quick work-around as I move to some other queuing system.

tar xf fail2ban-0.8.4.tar.bz2
cd fail2ban-0.8.4
python install
cp files/redhat-initd /etc/init.d/fail2ban
su -
chkconfig --add fail2ban
chkconfig fail2ban on
vi /etc/fail2ban/jail.conf

And go through the various sections (eg [ssh-iptables]), and change the ones you want to enabled = true
and change the lines like (/etc/fail2ban/jail.conf):

logpath  = /var/log/sshd.log

to your email address, and a sender that works for you, so if you run you might change to:

logpath  = /var/log/secure

(you have to change the logpath to secure.log)
If you use [sasl-iptables], then change the logpath to /var/log/maillog
And then of course start it (or reboot)

service fail2ban start

you can test the rules with

fail2ban-regex /var/log/secure /etc/fail2ban/filter.d/sshd.conf

The defaults worked fine for me, but you might want to look here for some alternate centos sshd rules.

What doesn’t work for me is a rule to ban attacks on my mail server. More on that when I find a good solution.


Okay, so you heard there are some cool new features in gimp-2.7. Well, it’s an unstable version. “But I want layer folders”. Yeah yeah, okay, so this should work for non-developers, but remember 2.7 is unstable.

The following will do a build from “gimp-build” directory which is in your home directory and install into “gimp” in your home directory.

Suggestions for improvements welcome.

This is using Ubuntu 10.04. Different versions may require some additional packages be installed.

export PREFIX=`echo ~/gimp`
export PATH=$PREFIX/bin:$PATH
export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig
sudo apt-get install libtool automake1.10 autoconf git-core gettext \
libglib2.0-0 libglib2.0-dev libgtk2.0-0 libgtk2.0-dev ruby \
intltool libtiff4 libtiff4-dev python-dev python-gtk2-dev \
libexif-dev libmng-dev liblcms1-dev libxpm-dev librsvg2-dev \
libwmf-dev libasound2-dev

mkdir gimp-build
cd gimp-build
git clone git://
git clone git://
git clone git://

cd babl
./ –prefix=$PREFIX
make install

cd ../gegl
./ –prefix=$PREFIX
make install

cd ../gimp
./ –prefix=$PREFIX
make install

Now you can run gimp as


How to install svn 1.6 for centos 5.5:
First enable the rpmforge repo (repository – a place for “rpm” packages),
then you can just install using yum. Note that after I installed the subversion, I then disabled the repo to keep my install as close to CentOS as I can.


rpm -ivh rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm

yum install subversion.x86_64

You can disable the rpmforge repo in /etc/yum.repos.d/rpmforge.repo
and changed enabled = 1 to enabled = 0

CentOS 5.5 is out …

Quick answer is VirtualBox. Free for personal use, and there is a GPL version. I’m trying out the PUEL version (free to check it out, free for personal use, not free for commercial use ($50)).

Step 1. Download and install the linux host. I’m using 64bit CentOS, linux, and the final download location was

rpm -ivh ./VirtualBox-3.1-3.1.4_57640_rhel5-1.x86_64.rpm

next add your users to the vboxusers group. Wow, seems to be no easy one liner to do that (normally just edit /etc/group). Usermod doesn’t take a group name (only the id), so here is a quick hack for you (group “vboxusers” exists after rpm installation above):

usermod -G `grep vboxusers /etc/group | awk -F: '{print $1}'` cameron

Suggest you just edit /etc/group :).

Now run Applications -> System Tools -> Sun VirtualBox

Click New

Click Next

Enter in a name (I used “windows7”), enter in the Version type (I’m using “Windows 7 (64 bit)”) and hit Next.

Now you need to choose the amount of memory. My machine has 6gig on it, and a quick look on top shows that I’m “only” using 2g. So I set the size to 3gig. My thinking here is that if I have the VM running, I want it to run well, if I need the memory back, I’ll shut down the VM. Click Next.

Now we need to choose a virtual hard disk. I googled around a little to see if I could my existing install, but that doesn’t really seem to be possible. Some information is here:

so I insert my windows 7 cd and hit next. and get a warning about running in 32bit mode… [TODO]

and now a warning about the CD/DVD drive:

There is a reboot during the installation:

Enter your product key. I’m using the one that is already installed on the box. We’ll see how that goes!

Well that went surprisingly well… It’s a shame that you can’t have it run off the same install that I already have (like I will do on my macbook), and perhaps this is not the end of the licensing story.