May 2009

Small rewrite of MySQL documentation

I’ve just did a quick rewrite of the MySQL documentation. I’ve added some pages for compiling MySQL 5.1.x and made some changes to the install page. All minor stuff but it might confuse the regular visitors.

Upgrading MySQL 5.0.x to 5.1.x

I’m very sorry this has taken so long. I wanted to make sure I had a good description of the instructions and tested it with most of the applications in use. I think I’ve got it nailed which means this instructions will give you a safe way to upgrade your MySQL version.

But as always with MySQL, make a backup of your data before you start messing with MySQL. I try to do my best at offering you a safe instruction set but I’m unable to foresee any combination of soft and hardware you might have installed so it might not work. You can use mysqldump, phpMyAdmin or any other tool you might use.

Alright, backup ready! Here we go…

First download the new 5.1.x packages, at the time of writing that would be 5.1.34. Download the appropriate package for your platform from the section called: “Mac OS X (package format)”. Then from the bottom section called “Source downloads” download the “Compressed GNU TAR archive (tar.gz)” package.

When you are ready you need to stop your current installation of MySQL, but because we made it foolproof and unstoppable (it will restart automatically) we need to do some extra steps:

sudo launchctl stop com.diymacserver.mysql
sudo launchctl unload /System/Library/LaunchDaemons/com.diymacserver.mysql.plist

Now the old 5.0.x installation of MySQL is stopped and you have a backup ready and waiting we can continue.

Open/Mount the disk-image of the 5.1.x version you just download and install MySQL from there by double clicking the installer and follow the instructions.

When you are finished continue with unpacking the 5.1.x source archive you downloaded as well. CD into the directory and execute the following commands:

For 64 bits on Leopard:
CFLAGS=”-arch x86_64″ \
CXXFLAGS=”-arch x86_64″ \
./configure --prefix=/usr/local/mysql \
--with-server-suffix=-standard \
--enable-thread-safe-client \
--enable-local-infile \
--enable-shared \
--with-zlib-dir=bundled \
--with-big-tables \
--with-readline \
--with-plugins=all \

For 32 bits on Leopard:
./configure --prefix=/usr/local/mysql \
--with-server-suffix=-standard \
--enable-thread-safe-client \
--enable-local-infile \
--enable-shared \
--with-zlib-dir=bundled \
--with-big-tables \
--with-readline \
--with-plugins=all \

I’m still working on Tiger but my old Tiger based G4 mini has died and I need to revive it again. Sorry

Followed by:

sudo make install

Now to restore all your databases we can do two ways: Quick and dirty or clean. Both will work, but you will need to check your users and passwords afterwords.

Quick and dirty:

Copy the data directory from your 5.0.x installation to the new mysql/data directory.

sudo cp -R /usr/local/mysql-5.0.81-osx10.5-x86_64/data /usr/local/mysql
sudo chown -R _mysql /usr/local/mysql/data/*

Startup MySQL and import your backup.

To startup MySQL you can just re-enable the lauchd commands:

sudo launchctl load /System/Library/LaunchDaemons/com.diymacserver.mysql.plist
sudo launchctl start com.diymacserver.mysql

All should be fine.

Postfix, Courier-Auth and IMAP updated and tested

This week was a mighty busy week for me as many programs got updates and I was still testing MySQL and the upgrade scenarios that are needed for current users. On top of that Apple came with the OS X 10.5.7 upgrade.

I’ve finished testing Postfix 2.6.0 and Courier auth 62.2 and Courier Imap 4.5.0 and I can tell you that you can upgrade safely to the newer version when you want to. I even upgraded my production server in the meantime.

The details on the Postfix upgrade:

  • Multi-instance support introduces a new postmulti(1) command to
    create/add/remove/etc. additional Postfix instances. The familiar
    “postfix start” etc. commands now automatically start multiple
    Postfix instances. The good news: nothing changes when you use
    only one Postfix instance. See MULTI_INSTANCE_README for details.
  • Multi-instance support required that some files be moved from
    the non-shared $config_directory to the shared $daemon_directory.
    The affected files are postfix-script, postfix-files and post-install.
  • TLS (SSL) support was updated for elliptic curve encryption. This
    requires OpenSSL version 0.9.9 or later. The SMTP client no longer
    uses the SSLv2 protocol by default. See TLS_README for details.
  • The Milter client now supports all Sendmail 8.14 Milter requests,
    including requests for rejected recipient addresses, and requests
    to replace the envelope sender address. See MILTER_README for
  • Postfix no longer adds (Resent-) From:, Date:, Message-ID: or To:
    headers to email messages with “remote” origins (these are origins
    that don’t match $local_header_rewrite_clients). Adding such
    headers breaks DKIM signatures that explicitly cover non-present
    headers. For compatibility with existing logfile processing
    software, Postfix will log “message-id=<>” for email messages
    that have no Message-Id header.
  • Stress-adaptive behavior is now enabled by default. This allows
    the Postfix SMTP server to temporarily reduce time limits and
    error-count limits under conditions of overload, such as a malware
    attack or backscatter flood.

The details on the Courier-Auth upgrade:

  • Compatibility fix for bash 4

The details on the Courier-IMAP upgrade:

  • Log more fatal errors on stderr
  • GnuTLS: add support for chained certs
  • Completely empty MIME entities incorrectly match any SEARCH request.
  • Some performance optimizations in header parsing
  • Incorrect reference to POP3_STLS in po3pdserver.c – should be POP3_TLS.

I’ve still have some issues in compiling the newly released Maildrop 2.1.0 but I’ll post a new blogpost as soon as that issue gets resolved.

For instructions on how to upgrade Postfix please read Upgrading Postfix.
To upgrade your courier-auth installation read Upgrading Courier-Auth
For instructions on how to upgrade Courier IMAP please read Upgrading Courier IMAP.

Mac OS X 10.5.7 update and security update 2009-02

I’ve just finished updating my test server with Mac OSX 10.5.7. The update went without any problem and my setup was not affected in a negative way. Even postfix kept working without a problem.

If you want to read more on what is affected in the updates I would suggest reading the Apple support site for the 10.5.7 2009-02 security update.

In case of doubt, please make a full bootable disk image backup with Cabon Copy Cloner before you start. There are some people having problems with the update so better be safe then sorry!

I will update my production machines later the coming weekend when I’ve got some more spare time.

PS. I just updated my production server and everything works like a charm. No problem what so ever.

Got myself a new Mac, finally

I’ve been considering a new Mac for quite some time now. I needed the upgrade as my current mini’s don’t support 64 bit mode. I’ve been dependent on the computers of others to develop the 64 bit instructions. This was not an ideal situation to work with. The trouble is of course choosing which Mac to buy. All new Macs are gorgeous and each has his strong points. The mini is the cheapest Mac which could do the 64 bits, I really like the mini (I have 3 of them). I even considered buying a Mac Pro with the possible virtualization options in the future. I finally settled for a 15″ MacBook Pro.

Some of the reasons for choosing a laptop were:

  • The ability to take it with me. More people are depending on my support for their server (yes I offer paid support on a best effort basis) and being away from home without a Mac is making it difficult.
  • The option to use it for my day job and to drop the ugly Dell laptop I got from my employer. You’ve got to admit the new unibodies are drop dead gorgeous.
  • It’s gorgeous!
  • I think the 2 GPU’s are going to give me an advantage when Snow Leopard will be able to utilize them with the OpenCL stuff. This should mean I can keep using the new laptop for quite some time without it getting old and slow.

I wanted to to thank all the people who donated money, it’s been used to help me buy the laptop.

Here is a picture of the new laptop on my desk at home. Still installing and configuring the basic stuff before installing a new version of DIYMacServer. Enjoy.

PS. Just found out my old G4 mini got a problem. Probably a faulty hard drive…

Next Page »