Archive for category Computers

Switching MySQL for MariaDB on Ubuntu.

MariaDB offers quite a few improvements over MySQL, mainly in the storage engines it provides. Firstly, the Maria engine is a crash safe version of MyISAM which in the future will also support transactions. Secondly, the XtraDB engine is an enhanced version of Innodb which can give considerable speed improvements over the standard Innodb engine. There are many other features and improvements over the standard MySQL distribution, move info on the differences can be found here: http://askmonty.org/wiki/MariaDB_versus_MySQL

The easiest way to install MariaDB is to add one of the repositories, I’ve used OurDelta:

wget -O- http://ourdelta.org/deb/ourdelta.gpg | sudo apt-key add -
sudo wget http://ourdelta.org/deb/sources/lucid-mariadb-ourdelta.list -O /etc/apt/sources.list.d/ourdelta.list

Then install MariaDB:

sudo apt-get install mariadb-server-5.1

This should install MariaDB without any problems, it should also replace MySQL if you already installed it:

# apt-get install mariadb-server-5.1
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following extra packages will be installed:
libmariadbclient16 libmysqlclient16 mariadb-client-5.1
mariadb-client-core-5.1 mariadb-server-core-5.1 mysql-common
Suggested packages:
tinyca mailx mariadb-test
The following packages will be REMOVED
libmysqlclient-dev libmysqlclient16-dev mysql-client mysql-client-5.1
mysql-client-core-5.1 mysql-server-5.1 mysql-server-core-5.1
The following NEW packages will be installed
libmariadbclient16 mariadb-client-5.1 mariadb-client-core-5.1
mariadb-server-5.1 mariadb-server-core-5.1
The following packages will be upgraded:
libmysqlclient16 mysql-common
2 upgraded, 5 newly installed, 7 to remove and 8 not upgraded.

If you are upgrading from MySQL, you will probably be prompted to overwrite the my.cnf and for a new root password. I generally choose Y to overwrite and enter my existing root password to avoid issue.

You can also follow my previous post to upgrade the client library used by PHP, rather than installing the MySQL dev package, the Maria equivalent should be used:

sudo apt-get install libmariadbclient16-dev
  • Share/Bookmark

Update Zend Server MySQL extensions

As the MySQL extensions with Zend Server are out of date, I decided to update them as it’s pretty simple to do.

Install the source package:

sudo apt-get install php-5.2-source-zend-server

or

sudo apt-get install php-5.3-source-zend-server

Install the MySQL client dev package:

sudo apt-get install libmysqlclient16-dev

Install autoconf:

sudo apt-get install autoconf

From this point onwards I ran as root as saves time having to sudo everything, I have also created symlinks for the binaries in /usr/local/zend/bin to /usr/local (php, phpize, php-config, pear, pecl etc)

Change to the extensions directory of the source you just installed:

cd /usr/local/zend/share/php-source/php-5.3.2/

There are 3 extensions that need to be recompiled mysql, mysqli and pdo_mysql, the following procedure is the same for all 3:

cd mysql
./configure
make
cp modules/mysql.so /usr/local/zend/lib/php_extensions/

Finally restart Zend Server and all the MySQL extensions will be using the latest libraries.

  • Share/Bookmark

Zend Server on Ubuntu Lucid has dependency problems

When trying to install Zend Server on Lucid you will be met with the following dependency problems:

The following packages have unmet dependencies:
php-5.2-mysql-zend-server: Depends: libmysqlclient15off (>= 5.0.27-1) which is a virtual package.
php-5.2-pdo-mysql-zend-server: Depends: libmysqlclient15off (>= 5.0.27-1) which is a virtual package.
php-5.2-mysqli-zend-server: Depends: libmysqlclient15off (>= 5.0.27-1) which is a virtual package.

Along with the rather unsatisfactory resolution:

The following actions will resolve these dependencies:
Keep the following packages at their current version:
help-zend-server-ce [Not Installed]
php-5.2-common-extensions-zend-server-ce [Not Installed]
php-5.2-mysql-zend-server [Not Installed]
php-5.2-mysqli-zend-server [Not Installed]
php-5.2-pdo-mysql-zend-server [Not Installed]
zend-server-ce-php-5.2 [Not Installed]

The reason for this error is that the Zend MySQL packages are built against MySQL 5.0 (despite the fact 5.1 has been GA for over a year now).

Ubuntu have removed MySQL 5.0 in Lucid, but the package from Karmic is usable and available here: http://ns2.canonical.com/pt/karmic/libmysqlclient15off

Simply install this and Zend Server will install nicely.

  • Share/Bookmark

A shaky start for Ubuntu 10.04 Desktop

Whereas I have been running Lucid since beta1 on my laptop without too many issues, my desktop PC doesn’t get upgraded until release day.

After eventually managing to download the ISO, loading 5 different email backups to find my Nero key and waiting half an hour for the Lightscribe to burn onto the CD I finally got to boot the live CD….

Flashing cursor…
Power saver mode…
[2 minutes go by]
Screen powers on…
Strange Windows 7 blockiness (presumably something left in the video memory)…
[Another minute goes by]
Desktop, finally.

Install goes smoothly, nice to see the migration wizard is disabled by default and has clear options, should you choose to use it.

Try to reboot and machine hangs with just the desktop background.

Reset, restart…
The infamous flashing cursor…
Login screen…

I attempt to login and get a popup about power saving not working do I still want to logout? Odd… No I want to login really :)

Click continue, it goes away, finally get to the desktop.

One thing is immediately clear, Plymouth = EPIC FAIL.
So far it doesn’t work on Intel or Nvidia hardware, 2 of the 3 post popular video chip manufacturers!
I guess this is what happens when you name something after a scummy little city hidden away in the south west of England…

Testing continues…

  • Share/Bookmark

Fix for missing boot screen with Ubuntu 10.04 betas/RC

Here is a quick fix for the missing boot screen:

echo FRAMEBUFFER=y > /etc/initramfs-tools/conf.d/splash
update-initramfs -u

Note that this fix does marginally slow down boot, but only by a few seconds.

  • Share/Bookmark

Installing your Windows fonts on Ubuntu (via Wubi)

Here is a quick way to copy your Windows fonts over to an Ubuntu Wubi installation:

mkdir ~/.fonts
cp /host/WINDOWS/Fonts/*.tt* ~/.fonts/
cp /host/WINDOWS/Fonts/*.otf ~/.fonts/

Applications should then pick up all your Windows fonts :)

  • Share/Bookmark

Ubuntu 10.04 Preview (Desktop using VirtualBox)

Setup

Setting up the desktop edition of Lucid with Virtualbox was a little problematic at first. Install went fine and I rebooted to find myself in a very small desktop which was rather sluggish.

I opened up a terminal and installed the guest additions software:

sudo ./VBoxLinuxAdditions-amd64.run

(or use the x86 version for 32 bit).

After a reboot there is a lot of screen flashing and eventually a message comes up about low graphics mode.

To fix this login and perform the following:

gksudo gedit /usr/src/vboxvideo-3.1.4/vboxvideo_drm.c

Go to line 90:

.ioctl = drm_ioctl,

Replace it with:

#if defined(DRM_UNLOCKED) || LINUX_VERSION_CODE >= KERNEL_VERSION (2, 6, 33)
.unlocked_ioctl = drm_ioctl,
#else
.ioctl = drm_ioctl,
#endif

Then run:

sudo /etc/init.d/vboxadd setup

This solution came from this blog:


After rebooting following this fix the mouse pointer is invisible, so another fix is needed:

Edit:

/etc/X11/xorg.conf

Add:

Section “InputDevice”
Identifier “Configured Mouse”
Driver “vboxmouse”
Option “CorePointer”
EndSection

Reboot and everything should run nicely, including Compiz.

This solution came from here:


Checking for updates, there are 245 updates just a few days after the release of the beta, the dev team have obviously been busy! Unfortunately the updates broke the VBox addons again so I had to run the setup command above again to fix this and reboot.

I had a minor issue with resizing the VBox window to fit my screen, it messed up the panels and I had to unlock/reorganise them to fix this.

What’s new?

The most obvious change is the new UI, it’s almost exactly like I have Karmic skinned now so a nice change. It’s much more like OSX than the previous Human skin. The only thing I’m not a fan of is the decision to move the minimise/maximise/close buttons to the left hand side of the window.

It’s also quite noticeable that Google has disappeared and been replaced by Yahoo. I can’t help wonder how many people won’t change their default search provider right back to Google as the first thing they do with Firefox!

The next thing I noticed was that the ‘status’ button on the top panel had been given a bit of a rework, it now includes the ability to add ‘broadcast channels’ which are simply social network integration for Facebook, Twitter etc.

This pretty much sums up the noticeable changes, under the scenes there are obviously numerous package updates, what difference this makes to the OS will yet to be determined.

First Impressions

Overall the new design looks nice albeit a little too OSX-ish for my liking, the new colour screme is great though. The social networking integration is nice, the replacement of Google with Yahoo, not so much.
I had a few issues with slowness, crashes of plymouthd and occasional other errors but while this is a beta version these are to be expected.

  • Share/Bookmark

Ubuntu 10.04 – Looks like it will ship with PHP 5.3

I took a look on Launchpad today to see if there was any indication as to which version of PHP Ubuntu had decided to ship with the next release. As it’s an LTS release there is always the possibility that they may go for the slightly more stable options than the slightly more experimental options as they will have to support this edition for the next 3 years.

It appears from a package search that 2 days ago PHP 5.3.1 packages were added to Lucid. It’s quite a big step, and will be interesting if they also include a 5.2.x release along side it as so many applications are not ready for 5.3 yet.

More information can be found on Launchpad:


  • Share/Bookmark

Which RAID is best?

There are many sites with various RAID comparisons on and many more making various claims as to which RAID type is the best for various purposes/fastest/etc.

The 2.5Tb storage partition on my Xen box decided to pack up recently (or at least Xen decided it no longer wanted to read the partition) so after backing up the data decided to run some tests.

Drives: 4x Western Digital RE 1Tb

RAID 5:

This was the original configuration of the array, despite having fast drives in my desktop and 1Gbit network the read speeds were slower than expected (around 35Mb/sec).

The hdparm results were inconsistent:

Timing cached reads: 10118 MB in 2.00 seconds = 5064.59 MB/sec
Timing buffered disk reads: 224 MB in 3.02 seconds = 74.24 MB/sec

Timing cached reads: 10020 MB in 2.00 seconds = 5016.71 MB/sec
Timing buffered disk reads: 148 MB in 3.03 seconds = 48.83 MB/sec

Timing cached reads: 10126 MB in 2.00 seconds = 5068.86 MB/sec
Timing buffered disk reads: 200 MB in 3.03 seconds = 65.94 MB/sec

Timing cached reads: 10086 MB in 2.00 seconds = 5049.90 MB/sec
Timing buffered disk reads: 234 MB in 3.02 seconds = 77.55 MB/sec

Timing cached reads: 10042 MB in 2.00 seconds = 5027.45 MB/sec
Timing buffered disk reads: 210 MB in 3.01 seconds = 69.80 MB/sec

Average over the 5 tests: 67.27 Mb/sec

RAID 10:

As an alternative I switched the array to RAID 10, the downside of this configuration is that there is 1Tb less space than RAID 5.

Timing cached reads: 10170 MB in 2.00 seconds = 5091.34 MB/sec
Timing buffered disk reads: 320 MB in 3.01 seconds = 106.46 MB/sec

Timing cached reads: 10094 MB in 2.00 seconds = 5052.71 MB/sec
Timing buffered disk reads: 316 MB in 3.02 seconds = 104.59 MB/sec

Timing cached reads: 10072 MB in 2.00 seconds = 5041.96 MB/sec
Timing buffered disk reads: 314 MB in 3.01 seconds = 104.29 MB/sec

RAID 10 results are much more consistent.
Average over the 3 tests: 105.11 Mb/sec

RAID 6:

Another configuration offering 2 disk redundancy.

Timing cached reads: 10172 MB in 2.00 seconds = 5091.87 MB/sec
Timing buffered disk reads: 202 MB in 3.01 seconds = 67.06 MB/sec

Timing cached reads: 10052 MB in 2.00 seconds = 5031.76 MB/sec
Timing buffered disk reads: 202 MB in 3.01 seconds = 67.18 MB/sec

Timing cached reads: 10102 MB in 2.00 seconds = 5057.17 MB/sec
Timing buffered disk reads: 206 MB in 3.00 seconds = 68.59 MB/sec

RAID 6 results are also fairly consistent.
Average over the 3 tests: 67.61 Mb/sec

It seams that with this configuration that RAID 5/6 perform at roughly the same speed, however RAID 10 seams to win out on the speed test with over 50% improvement over RAID 5/6.

  • Share/Bookmark

Microsoft finally release a virus scanner

Microsoft Security Essentials has now been officially released (conveniently just before Windows 7 release, perhaps?).

I switched it out with Kaspersky about a week ago and so far so good. Kaspersky for Windows 7 is buggy and causes many slow down issues, it may be a beta but at this close to the October release date it’s a pretty poor offering. MSSE works like a charm, no slow down issues, virus tests on YouTube show excellent results, plus the best thing is it’s completely 100% free.

Find it here:


  • Share/Bookmark