Another weekend hacking away

Another weekend hacking away

13/02/11 | by admin [mail] | Categories: Hardware

So, I found a nice book called Linux Sysadmin Recipes which covers a range of practical solutions and tools for administering Linux (and *nix) servers. It's the kind of good practical hints and tips that are really needed.

Anyway, one of the things Juliet Kemp suggests is to set up a wiki for managing documentation. A wiki has a number of strengths that make it quite useful for this. It is web accessible, meaning you can access it from any web browsers (more or less), and perhaps more usefully, make it accessible (in full or part) to other IT staff and end users. So, you can do something useful like document how to set up an email client, or VPN service, and your junior IT staffers and end users can read the info from their web browser. And by putting the info in one place, you can update it in one place, and everyone has access to the current version. And you can keep the more complex internal documents restricted to the appropriate staff.

The wiki can act as documentation, and knowledge base, and different users can be given different access. You can integrate authentication into your existing LDAP (or other directory service) and make it internal and/or internet facing. If you have multiple IT staff, they can update the documentation as needed, and since a history is kept, you can see the changes and who made them.

All in all, a very useful tool.

So, Juliet suggest mediawiki, which is very similar to the old wikipedia layout. Mediawiki requires a database backend (the usual suspects) PHP5, and a webserver (supported is IIS, Apache). I decided to try an install on 10.4.11 server, as I'd recently acquired a couple of cheap 10.4 licences, and 10.5/10.6 Server have their own wiki services built in.

First up was setting up a virtualised Mac OS X Server. More challenging than it appears. First attempt was with VMware Fusion 3. I used the 10.5 profile, and installed from a 10.4.7 iso. Install went ok, config went ok, update to 10.4.11 et al went ok. Open a terminal and type mysql -V and the VM hang. Interesting, reboot and try again. Same thing. Re-install to 10.4.7 and same thing, update to 10.4.11 et al and same thing.

So, no luck with vmware. I decided to cut my losses and try VirtualBox.

VirtualBox is maybe not as nice, but is a little more 'flexible'. So, go through the install routine under VirtualBox, and config, and update, and test and it works.

Now, 10.4.11 comes with PHP 4.4.9, so to run the current release of MediaWiki, I will need to update to PHP5, with the appropriate mods for Apache 1.3 (or else also update Apache to Apache2 on Tiger). Luckily, the guys at have already built PHP 5 for Mac OS X. But on 10.4.11, only version 5.2. But it will work, so I download, and install, and follow the instructions to disable the php4 module for Apache in Server Admin Web service.

Restart the web service, make a test page index.php with a print statement and the phpinfo() function and confirm that PHP5 is installed and working.

The next step is MySQL. The tools for starting/configuring MySQL are in /Applications/Server in 10.4. It's nice that they decided to integrate it into Server Admin in 10.5. I start the service, and set a mysql root password.

Good to go? Not quite. The PHP5 module references the default socket for mysql, which is /tmp/mysql.sock, rather than /var/mysql/mysql.sock. This need to be changed in the php.ini file, which is in a different location since PHP5 has installed into /usr/bin/local rather than overwrite PHP4. Which is a good thing, just takes a little hunting around to find it.

I updated the php.ini file, restarted apache, and checked my test php page to see if it the updated mysql socket details have come across.

Everything is ok, so I download and extract the mediawiki tarball, and set up a website to point at it, and create and chmod a config folder. And run through the install. No issues. Copy the created conf file to the web root, and we're up and running.

It works.

Is it worth it? Or is 10.5/10.6 wiki easier to deal with? It's a little bit of work, and I'd only recommend it if you needed to run it on 10.4. If you have 10.5/10.6, then it is far less effort to install (enable php5 module, start mysql, set up a website to point at the extracted mediawiki folder), although still a little more effort than setting up the wiki service. The 10.5/10.6 wiki is better looking by default.

Assuming you were installing this on a hosted service, with only FTP and phpMyAdmin (and php5/apache etc), then it is very doable. All files can be uploaded, moved, created, manipulated with any decent ftp client, and phpMyAdmin will allow you to manually create the databases if you don't have the mysql root password.

One of the things this experience does underline, though, is some of OS X's weakness compared to Linux. Installing an updated version of PHP on any major distro of Linux, is near trivial. Indeed, updating Apache and MySQL is fairly trivial, too. If I had wanted or needed the current version of PHP (5.3.5), then I would have had to build from source, which would mean digging around for the source and instructions. Macports does have 5.3.5, although it is not clear if it apache2 only.


Comments, Pingbacks:

No Comments/Pingbacks for this post yet...

Comments are not allowed from anonymous visitors.

Current Hardware Projects

This is all about my on going fumblings with hardware. Regular entries should provide an indication of the depths of my obsession.

September 2018
Mon Tue Wed Thu Fri Sat Sun
 << <   > >>
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30



Amiga Links

XML Feeds

What is RSS?

powered by b2evolution free blog software