November 2007


Another write-up on MySQL compilation instructions

While trundling to my subscribed RSS feeds (still too many and I’m still pruning them regularly) I noticed John Gruber mentioning his friend Dan Benjamin writeup of his MySQL compilation instructions article. I’ve read it and it’s pretty good and really well written for an audience who have no experience at the Terminal.

I do however not gree with all his instructions which are pretty much geared to his need to get Ruby on Rails working for him. The most important mistake I see is that he doesn’t go for the shared libraries options. He is compiling static libraries and we know from experience (read the older blogpost son the subject) that that options causes issues with for instance our PHP compilation.

Another item that keeps me wondering is why he’s removing the default StartupItem which works fine even wth your own compiled installation and replace it with a new launchd script. But I would recommend to read the article yourself and draw you own conclusions.

By the way, the installation instructions for MySQL, Apache and PHP have been updated to reflect the impact that Leopard had on them. I’m still working on the mailserver instructions.

Daemon user creation changed in Leopard

As I already blogged before, there where some changes in the user creation. I noticed the new notification for the mysql user which changed in Leopard into _mysql, the underscore appears on almost all the users that aren’t connected to people. The only users without an underscore are ‘daemon’, ‘nobody’, ‘root’ and me.

But more has changed I found out. As where I first used the Netinfo tools to create users for daemons to have them use it, like the vmail user for the virtual mail directory. But in Leopard these tools are gone! There is also no GUI tool to have a look at them.

There is a new tool in town, it’s called the ‘Directory Service command line utility’, ‘dscl’ for short and is command line only! See this article in the Apple knowledgebase and the dscl man page here.

Here is a example on how to use the tool which you have to use as root or use with the sudo command. To find out the UID of the postfix user you use the following command:

$ sudo dscl . -read /Users/_postfix

Which returns:

AppleMetaNodeLocation: /Local/Default
NFSHomeDirectory: /var/spool/postfix
Password: *
PrimaryGroupID: 27
RealName:
Postfix Mail Server
RecordName: _postfix postfix
RecordType: dsRecTypeStandard:Users
UniqueID: 27
UserShell: /usr/bin/false

This means another task for rewriting the documentation. Which makes me a bit sad.

Apache 2.2.6 and PHP 5.2.4 default available in Leopard

Tiger shipped with the heavily outdated Apache 1.3.x and PHP 4.x. While both of these versions where working and helped people to get started most of us liked working on the newer releases of that software. Besides the Apache Software Foundation has moved into security update, and critical bug fix only mode for the 1.3.x series of the web server and as we all know the PHP project as announced end of life for PHP 4. Its a good time to move on as I showed you how to do on my blog.

To my surprise however I found when plating around with my Leopard install it has as default the latest version of Apache and PHP installed per default. You still need to activate the PHP module yourself by uncommenting it in the httpd.conf configuration file which is in a new location by the way.

The new location of the configuration and the modules is in ‘/etc/apache2/’ instead of the default ‘/etc/httpd/’ you would expect. I’m sticking to the last one by the way for my installation.

The modules are installed in ‘/usr/libexec/apache2/’ and there are some remarkable modules name in there. What would you think of a module called mod_bonjour, I wonder what that one does. Another one is mod_auth_svn which would indicate a default installation and wonder me it’s installed. Mod_perl and mod_fast-cgi are there as well. I will try to mimic the availabilty of these modules in my install scripts.

PHP is another question, with php-info() you can retrieve the configure command-line, it looks like:

./configure ‘–prefix=/usr’ ‘–mandir=/usr/share/man’ ‘–infodir=/usr/share/info’ ‘–disable-dependency-tracking’ ‘–with-apxs2=/usr/sbin/apxs’ ‘–with-ldap=/usr’ ‘–with-kerberos=/usr’ ‘–enable-cli’ ‘–with-zlib-dir=/usr’ ‘–enable-trans-sid’ ‘–with-xml’ ‘–enable-exif’ ‘–enable-ftp’ ‘–enable-mbstring’ ‘–enable-mbregex’ ‘–enable-dbx’ ‘–enable-sockets’ ‘–with-iodbc=/usr’ ‘–with-curl=/usr’ ‘–with-config-file-path=/etc’ ‘–sysconfdir=/private/etc’ ‘–with-mysql-sock=/var/mysql’ ‘–with-mysqli=/usr/bin/mysql_config’ ‘–with-mysql=/usr’ ‘–with-openssl’ ‘–with-xmlrpc’ ‘–with-xsl=/usr’ ‘–without-pear’

Which looks a lot what I had with some extra’s, I’m looking into which ones I will add.

« Previous Page