Skip to content

Entries from January 2011.

Download Plesk

Because sometimes (unaware) customers ask for this horrible panel and the lame site asks for login each time you want to take a fart (cheers for that, here are some download links:

Enjoy (if you can)!

Fix Flash sound problem for Fedora 14

And here's how:

Remount a partition in FreeBSD

Today I needed to remount the /tmp partition on a FreeBSD box, however without even thinking I typed:
mount -o remount,noexec /tmp
That obviously didn't work, cause it's a "linuxism".
What I needed to type is:
mount -u -o noexec /tmp
And voila!
It's a small, crappy tip, but the first results from google on the subject return incorrect ways of doing this.

Re-read partition table in Linux

Tonight I needed to clone some HDD. After the cloning finished I wanted to inspect the partitions on the new drive without rebooting (sheer laziness); I obviously couldn't, the OS wasn't yet aware of the new partition table.
To make the OS aware of the new partition table you have 2 options:
1 - reboot
2 - use partprobe or blockdev (--rereadpt).

Good luck! ;-)

Elastix on Xen howto

Elastix is an open source Unified Communications Server software that brings together IP PBX, email, IM, 
faxing and collaboration functionality.
It has a Web interface and includes capabilities such as a Call Center software with predictive dialing.

The Elastix functionality is based on open source projects including Asterisk, HylaFAX, Openfire and Postfix.
Those packages offer the PBX, fax, instant messaging and email functions, respectively.

As presented above (fragment from the wikipedia page), Elastix can be quite useful if you want to run your own PBX.
As it is based on Centos I initially tried to install it the Centos way, but I encountered lots of problems so I ended up using a Linux KVM vm (I'm in love!), tweak that a bit, tar it up and transfer it to a xen dom0.
I have already lost too much time trying to get it installed so I will not comment on this anymore.
I will assume that you will use my Elastix (v2.0.3) xen image and that you also have a working LVM based (Centos) xen dom0. As most things linux there are multiple ways of doing this, this is my way. Let's begin:

- 1 - Let's create 2 LVM volumes for the elastix vps:
lvcreate -L10G -nelastix-root vg0; lvcreate -L1G -nelastix-swap vg0

- 2 - Download and extract the image:
wget; tar xjf elastix.tar.bz2

- 3 - Format the volumes and copy the contents of the tar archive on to the root one:
mkfs.ext3 /dev/vg0/elastix-root
mkswap /dev/vg0/elastix-swap
mkdir /mnt/elastix
mount /dev/vg0/elastix-root /mnt/elastix
cp -a elastix/* /mnt/elastix/
umount /mnt/elastix/

- 4 - Create a xen cfg file for this domU: vi /etc/xen/auto/elastix.cfg
bootloader = "/usr/bin/pygrub"
name = "elastix"
memory = "512"
disk = [ 'phy:/dev/vg0/elastix-root,sda1,w', 'phy:/dev/vg0/elastix-swap,sda2,w' ]
vif = ['vifname=elastix,bridge=xenbr0']
on_poweroff = 'destroy'
on_reboot = 'restart'
on_crash = 'restart'

- 5 - After saving that file start the virtual machine:
xm create -c /etc/xen/auto/elastix.cfg

- 6 - Log in the vm, change the password using the "passwd" command and set up the networking (run "setup" if you don't know which system config files to edit). When asked for a password please input "parola2011" (without the quotes). Please change the root password ASAP!!
- 7 - Visit http://IP_of_VM/ and log in as admin with password parola2011 (change the admin password ASAP!).


PS: You may want to change some system settings like the keyboard layout (set to uk) and timezone (set to Europe/Bucharest).

mod_substitute in rhel/centos 5

Apparently mod_substitute has finally been backported into rhel 5:
Transaction Check Error:
  file /usr/lib64/httpd/modules/ from install of httpd-2.2.3-43.el5.centos.3.x86_64 conflicts with file from package mod_substitute-2.2.11-1.el5.ld.x86_64

No need for 3rd party repos for this module anymore. Hurray! :-)

No more php53 repo

As Centos 5.6 and Centos 6 will provide PHP 5.3 shortly, there is no need for my repo so I'm discontinuing that. If you need help migrating to the stock packages let me know.
I will be still packaging PHP 5.2 as there are still cases where this version is needed. For contact use rpm at

When was a linux OS installed?

By mistake I found out how one can discover when his linux OS was installed, most of the cases. Previously I had no idea how to do this and not even this may be the best idea (if you know other ways to do this, let me know):
dumpe2fs -h /your/root/partition|grep created

The command will show when the filesystem was created initially, but if we ask for the / or /boot fs information, then this should be the install date.
sudo dumpe2fs -h /dev/sda2|grep created
dumpe2fs 1.41.12 (17-May-2010)
Filesystem created:       Thu Dec  9 21:34:06 2010


CentOS install over VNC

Sometimes we need/want to reinstall a remote Centos (or other distro) server. We can either ask the data centre to do it, but this can be costly or we can do it ourselves as long as we still have a functioning system.
The procedure to install Centos (same for RHEL and Fedora) is amazingly simple, the only thing we need is a barely functional system with grub and good connectivity.
My main source of inspiration for this article was a blog post from Karanbir; I'm writing this only to have a lighter, easier to read and copy/paste from document.
In this case I'm also using Centos as the existing remote OS. Here we go:
cd /boot
wget -O pxe-initrd.img
wget -O pxe-vmlinuz

Now we need to add a grub entry using the downloaded files and set it default. Add something similar to your grub.conf/menu.lst (make sure to change the IP settings, password** etc):
title Centox-vnc-install
        root (hd0,0)
        kernel /boot/pxe-vmlinuz vnc vncpassword=blah132 headless ip= netmask= gateway= dns= hostname=blahserver ksdevice=eth0 method= keymap=uk lang=en_GB
        initrd /boot/pxe-initrd.img

You might also want to add "biosdevname=0 net.ifnames=0" to the vmlinux command line if you don't want your network interfaces to be renamed to em1 or eno1 which seem to happen in CentOS 6 and 7 under certain circumstances.

Double check the above entry is default and reboot. Keep pinging the IP you specified above, when it's up start vncviewer on IP:1. That's it, now you can reinstall your server(s) whenever you want without asking for KVMoIP or the data centre staff to do it for you.

** Achtung! Vncpassword needs to be 6-8 characters long otherwise you won't be allowed to connect.

Wow Artica

Wow, how did I not hear about Artica before?! Looks awesome.

PHP 5.3 & Bind 9.7 in Centos Testing repo

Apparently we can now have PHP 5.3 and Bind 9.7 in Centos from the Centos-testing repo even though Centos 5.6 (nor 6.0 for that matter) is not yet released. Nice!

Some hard things are easy if explained

Indeed they are.

Amazing dolphins

What are dolphins doing with all that brain? Air bubbles of course!

Mandriva 2011 preview

Wow, Mandriva 2011 preview! Get it while it's hot!