Archive for the 'Blog' Category

Apache 2.2 on OS X Tiger

System Preferences

System Preferences

This guide will show you how to install Apache 2.2 on Mac OS X Tiger (and probably Leopard) in a way that will allow you to turn the apache server on and off via System Preferences. Phpmac.com had a guide to do this for Apache 1.3 but I have been unable to get onto that website for a long while now so I decided to write my own guide. This guide assumes that you are installing from source, that you have the Xcode package installed and you know how to user the Terminal.

Getting the source
First thing you will need to do is to go to httpd.apache.org and download the latest version of Apache 2.2. I used version 2.2.8 but the latest is 2.2.9 at the time of writing this. You should see a link to the source on the front page.

Configure and Compiling
I choose to install apache to /usr/local/apache2 with modules enabled. Assuming that you have unpacked the version of Apache you have just downloaded you should open the Terminal and change into that location.
$ ./configure --prefix=/usr/local/apache2 \
--enable-module=most \
--enable-shared=max
$ make
$ sudo make install

These commands will configure the httpd package, compile and then install it. This is the easy part, the hard part is configuring Apache to run from system preferences.

httpd.conf
Now that Apache is installed we need to configure it. There are three things you will need to do to the config file which is located in /usr/local/apache2/conf/httpd.conf . The location will depends upon what you used for –prefix= .

You need to search for the user and group name in httpd.conf. The default user and group is “daemon” but OS X uses “www”. This is line 65 on my install. After you have changes the user and group from “daemon” to “www” it should look like this.

User www
Group www

At the bottom of this config file you need to add a line to tell Apache where to store it’s PID file. This is important as this tells OS X what program to terminate when you stop the Apache service.
PidFile /var/run/httpd.pid

System link
This is the last step to getting Apache 2.2 to work from system preferences but I have an important note. This moves the default Apache 1.3 binary and replaces it with a link to our Apache 2.2 install. I have found that when I install one of Apple’s security updates the link has been replaces with the original Apache 1.3 binary. Therefore you may have to repeat this step from time to time.

In there terminal there are three command you have to run. The first one moves us into the directory that we need to work in. The second commands moves the Apache 1.3 binary out of the way and the final command replaces it with a link to our Apache 2.2 install.

$ cd /usr/sbin
$ sudo mv -v apachectl apachectl-1.3
$ sudo ln -sv ../local/apache2/bin/apachectl .

The End
Now all you have to do is go to System Preferences, click on “Sharing” and then enable “Personal Web Sharing”. When you open up your browser and type in 127.0.0.1 or [::1] (IPv4 and IPv6 respectively) you should see “It Works!“.

PSU hell

Some time ago I was given a a PowerMac G4 Quicksilver that needed a new PSU. Instead of getting a new one I made an adapter that used the damaged original PSU to supply the 25v needed and a regular ATX PSU to do the rest of the work.

Now I have a newer PowerMac G4 Mirrored Drive Door that also has a damaged PSU. I plugged it in when I got home and the fuse blow up. I’m hoping that the fuse is the only thing that needs replacing as this computer is would be the best mac that I have.

It would also seem that either the PSU or logic board has gone in my PowerMac G4 Sawtooth so that would need fixing at some point or it might be given away for recycling. In other mac news I need a new logic board for my PowerBook G4 because my FW400 port has gone and that is needed for the scanner. Even if I can’t get the software to work it would be a good idea to fix the laptop before my warranty runs out. Also my PowerMac G3 B&W is running fine with no faults that I know of. Cos one of them has to be fine…

Still some SPARC left

Last week I decided to start working on my Sunblade 100 that I got back in November. It has been sitting on my stack for about the last two months without even being turned on once. The main reason for this was the lack of networking and my knowledge of Sun’s Solaris OS. After hearing that some people had Ubuntu server running on these machines I decided to download and try it. I now have Ubuntu 7.10 installed with networking and a Linux environment that I’m used to. After disabling the built in speaker because it frustrated me to the point of smashing some keys off of my keyboard with it’s beeping when using the console. Now only thing that annoys me now is the loud hard drive but as I use it via SSH I don’t have to been in the same room as it.

Sun Blade 100

The Blacklist

In case you’re not familiar with the term “blacklist” I will elaborate. There are three colours representing different kind of list; White, Black and Red. White is a free pass with no questions asked, Black doesn’t let you in the club and Red puts you in a headlock until the cops arrive and take you away.

My blacklist is very small at the moment only consisting of one email address and one IP address. I have some anti-spam measures in place but they don’t stop everyone getting through so I look for a patten from the IP and email address marked as spam. Any that turn up a lot go on the blacklist and are never heard from again….hopefully.

Cosmo version 9 and Server

I managed to get Cosmo version 9 online at midnight but there was a problem with IE6. Thankfully it was only IE6 and it was fixed within half an hour after I woken up and had breakfast. The site is controlled by one single PHP page that calls in the content and updates the blog each month automatically. It has in place functions that make the site more secure such as checking that the page trying to be loaded is a real page and not an off site link or an incorrect date.

The server that hosts all my websites is now running my own home brewed Linux OS called Blue Square Linux. The server has also had an extra 500GB fitted via a RAID SATA controller. It was a little bit of a problem at first because the kernel was custom compiled a long time ago without support for SATA.

Cosmo v9 – www.cosmo1847.co.uk
Blue Square Linux – www.bluesquarelinux.co.uk

Sun Blade 100

On Sunday I won a bid for a Sun Blade 100 on ebay and today it arrived. I am currently installing Sun Solaris 10 8/07 onto it. This is the first time I have touched the Sun Solaris OS and it is also my first SPARC workstation so this is all new to me but I am learning. The reason I got this is for me to learn about the Sun OS and hardware because this should provide me with helpful knowledge for future use. Once I have gotten used to Solaris and Sun’s hardware I hope to use it for a SPARC version of my OS.Sun Blade 100

Powermac G4

I’ve been given an Apple Powermac G4 Sawtooth computer as my friend’s dad was throwing it out. I took it because I knew it was better than the Powermac G3 Blue and White that I have. Today I striped it down, cleaned all of the parts and then put it all back together. Whilst I was doing this I identified the parts of the computer that make the most noise and started plotting on how to get rid of these. I need to replace the 120mm case fan and hard drive to make this computer silent. This Powermac G4 was formated with Mac OS X 10.4 Tiger and also had OS 9.2.2 installed so I can use classic applications or dual boot into OS9. This mac has 1.25GB of RAM and a 10GB hard drive along with a DVD drive and internal Zip100 drive. I use this to backup important information that I have onto Zip100 discs. I also got a Mitsubishi Diamond Plus 73 CRT monitor with the computer and it’s great. If you want the specs leave a comment.