Bashton Blog

TAG | centos

As pretty much always with Linux there’s more than one way to do this, but here’s how I got a nicely working para-virtualized Ubuntu Hardy domU running under a CentOS 5.2 dom0:

  • Install hardy under an HVM using the standard ISO
  • Boot into your new hardy install and run sudo apt-get install linux-image-xen (make sure you have universe enabled)
  • Add appropriate settings to your /boot/grub/menu.lst – here’s what I added:


title Ubuntu 8.04.1, kernel 2.6.24-19-xen
root (hd0,0)
kernel /vmlinuz-2.6.24-19-xen root=/dev/mapper/dsk-root ro
initrd /initrd.img-2.6.24-19-xen

  • Add a console on xvc0: sed -e 's/tty1/xvc0/' /etc/event.d/tty1 | sudo tee /etc/event.d/xvc0
  • Power off your Ubuntu VM
  • On your CentOS dom0, alter the Xen VM configuration file to boot using pygrub, very basic example below:


bootloader = '/usr/bin/pygrub'
memory = 1024
name = "ubuntu-test"
vif = [ '' ]
disk = [ 'phy:/dev/san1/ubuntu-test,xvda1,w']

  • Restart your Hardy VM and enjoy massively improved performance

One thing missing from the para-virtualized VM is VNC support – you have to use the console via the ‘xm console’ command.

The procedure should be similar for Citrix XenServer, although it will involve some messing with the xe vm-param-set command rather than editing the config file.  When I have a chance I’ll document this too.

Update, 30/9/08:

To enable a VNC console, do the following as well as the above:

  • Add the framebuffer drivers into the initramfs

echo "fbcon" | sudo tee -a /etc/initramfs-tools/modules
echo "vga16fb" | sudo tee -a /etc/initramfs-tools/modules
sudo sed -ie 's/^blacklist vga16fb$/#&/' /etc/modprobe.d/blacklist-framebuffer

  • Re-generate the initramfs

sudo update-initramfs -u -k all

  • Alter your grub menu.lst to include the boot options console=tty1 vga=normal (best done via the defoptions line, I tend to remove quiet and splash from here too)

Reboot, and you can now use a VNC console as well as the Xen xm console command.

, , ,

Some of you may have heard about the kerfuffle surrounding poor Perl performance on Red Hat 5/CentOS 5 – it got a bit of attention on reddit/digg.  Red Hat had been issuing hot fixes to people who complained, but now Karanbir Singh has created an updated Perl package.

This issue should be fixed in RHEL/CentOS 5.3, but until then, if you’re experiencing slowness I’d advise installing this – after appropriate testing on staging/UAT servers of course.

, ,

Sep/08

4

Django 1.0 Released

The final version of Django 1.0 has been released.  Debian packages are available from the unstable repository and these should install cleanly on Ubuntu too.

As I noted previously with the Alpha releases, an RPM for RHEL5/Centos can be built by doing:

python setup.py bdist_rpm

Note you’ll need an updated MySQL-python library installed, which can be found below.

MySQL-python-1.2.2-1.x86_64.rpm

If you’re not using a 64bit server, you can download this source RPM and rebuild via rpmbuild –rebuild:

MySQL-python-1.2.2-1.src.rpm

, , ,

I’ve just put up an long-ish article I’ve written comparing five different server distributions.  I fully realise that by doing so I’m opening myself up to hundreds of flames from outraged fans of <insert OS here>, all complaining that I’ve treated their pet distro unfairly.

Given that I’ll probably be accused of bias anyway, I better declare mine: the server that is serving you this page runs Ubuntu, as does the one running the main Bashton site. Many of our internal-facing servers run CentOS. My desktop runs Ubuntu, and my laptop runs Debian. Other staff have their own bias of course (particularly those who are Debian developers..), but as it was just me writing the article I don’t see that as relevant.

Please make your comments here and hopefully we can start some form of a useful debate, rather than the ‘distro X is the best’ discussions these things usually descend into.

, , , , , ,

Red Hat Enterprise 5 ships with Python 2.4.  As it uses this for the majority if its inbuilt scripts, it’s probably not such a good idea to just change it.

With this in mind, I built the following Python 2.5 RPMs, which create the python executable as /usr/bin/python25.  This means that where necessary, you can use Python 2.5, but the system scripts will continue to use 2.4.  If you do want to use Python 2.5 by default, by all means make /usr/bin/python a symlink to this – but don’t complain to me if ‘bad things’ happen.

64-bit RPMs:

python25-2.5.1-bashton1.x86_64.rpm
python25-devel-2.5.1-bashton1.x86_64.rpm
python25-libs-2.5.1-bashton1.x86_64.rpm
python25-test-2.5.1-bashton1.x86_64.rpm
python25-tools-2.5.1-bashton1.x86_64.rpm

Source RPM:

python25-2.5.1-bashton1.src.rpm

, ,

Older posts >>

Find it!

Theme Design by devolux.nh2.me