Skip to main content
  1. page/

Pocket LAMP

·555 words
Andy Jackson
Author
Andy Jackson
Fighting entropy since 1993
Table of Contents

Pocket LAMP #

LAMP is a very popular web development platform, and my Zaurus is a very nice way to keep a portable web server in my pocket.

MySQL #

The standard download for MySQL on the Zaurus is here. This has been very useful, but that version of MySQL (3.22.xx) is a little old and does not support the now very popular INNER JOIN syntax. So, I have hacked the latest stable Debian ARM packages in order to bring a 3.23.xx version of MySQL to the Zaurus.

After stealing a couple of files from the 3.22.xx distribution, I managed to to build an ipk distribution that deploys successfully on my Zaurus. Be warned that I have not stripped the original MySQL 3.23.49-8.7 distribution down very much, and you’ll need a fair bit of space for the install. I put it onto my SD card and then ipkg-link’ed it in from there.

Note that this package MUST be installed to a proper linuxy filesystem - the FAT32 filesystem that is the default for SD/CF cards is no good and the ipkg install should/will fail. See this page for information on formatting a card appropriately.

Installation #

  • Download the ipk here: mysql_3.23.49-8.7_arm.ipk.
  • Backup your databases - including the ‘mysql’ one that holds your user info.
  • Uninstall any previous mysql package.
  • Transfer the 3.23 ipk to the Z and install it. It must be installed on a proper linux filing system (see note above).
  • Ensure the database files in /var/lib/mysql are writable by user ‘daemon’.
  • Start up the server with a mysqlstart.
  • Run mysql_install_db to initialise the database.
  • Restart the server with a mysqlstop and then a mysqlstart.
  • Update you’re database tables from your backup.
  • If you are running low on space…
    • Move your database files from /var/lib/mysql to some other storage like SD or CF, and symlink them back to the original location.
    • Delete extra localization/language files that you don’t need.
    • Delete any binaries you don’t need. I think only mysqlstart,mysqlstop,mysqld,safe_mysqld and mysql are absolutely required, but YMMV. DO NOT remove any of the dynamic libraries - they are all required.

I’ve tested the package on my SL-5500 with the v3.1 Sharp ROM, and I know someone got it working on a C750. Please get in touch if you have any questions, or if you can confirm that the package works on other Zaurii/ROMs.

Known problems with this MySQL 3.23 ipk #

  • None at present.

Share and Enjoy.


Notes on hacking debian packages #

I originally tried to pick the packages apart under Cygwin using dpkg version 1.10.4, but the relavent command for turning a Debian package (.deb) into a tar archive (.tar): dpkg-deb –fsys-tarfile package_name.deb > package_name.tar kept dying with wierd errors in ‘subprocess paste’, whatever that means. Eventually tried version 1.6.14 on Solaris and it worked a treat.

Once this was working, I got the mysql packages and their dependencies (ignoring libc6 as the Zaurus already has this) and turned them all into tar archives using the syntax above. The required files can then be pulled from the tarchives and blatted together to create a suitable distribution. The only tricks were finding a machine I could use where I could set the UID and GID to be 0 (root:root on the Z), and getting the file permissions right so that the package deployed cleanly.