Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

10.4: Build Apache 2.2.3, php 5.1.15 and mysql 5.0.24 UNIX
This hint will only work if you have Xcode installed -- get it for free at Apple's Developer website.

The following steps use Terminal, and you'll probably have to use sudo on some of the commands if you're not logged in as root.

Download:
$ wget http://mirrors.ircam.fr/pub/mysql/Downloads/\
MySQL-5.0/mysql-standard-5.0.24-osx10.4-powerpc.dmg
$ wget http://www.apache.org/dist/httpd/httpd-2.2.3.tar.gz
$ wget http://www.php.net/distributions/php-5.1.5.tar.gz
Decompress
$ gnutar -xzf httpd-2.2.3.tar.gz 
$ gnutar -xzf php-5.1.5.tar.gz
Backup mysql data and install mysql
  1. cp -Rp /usr/local/mysql/data /Users/your_user_name/ -- only necessary if you're updating.
  2. Install mysql-max-5.0.24-osx10.4-powerpc.dmg -- install everything.
  3. rm -rf /usr/local/mysql/data -- only necessary if you're updating.
  4. mv data /usr/local/mysql/data -- only necessary if you're updating.
Read the rest for the Apache and php instructions...

Compile Apache
$ cd httpd-2.2.3 
$ ./configure --prefix=/Library/Apache2 --enable-access \
--enable-actions --enable-alias --enable-asis --enable-auth \
--enable-auth_dbm --enable-auth_digest --enable-autoindex \
--enable-cache --enable-cgi --enable-dav --enable-dav_fs \
--enable-deflate --enable-dir --enable-disk_cache \
--enable-dumpio --enable-env --enable-expires --enable-fastcgi \
--enable-file_cache --enable-headers --enable-imap \
--enable-include --enable-info --enable-log_config \
--enable-log_forensic --enable-logio --enable-mem_cache --enable-mime \
--enable-mime_magic --enable-negotiation --enable-perl \
--enable-rewrite --enable-setenvif --enable-speling --enable-ssl \
--enable-status --enable-suexec --enable-unique_id --enable-userdir \
--enable-usertrack --enable-version --enable-vhost_alias --enable-so \
--enable-module=all --enable-shared=max 
$ make 
$sudo make install
Compile php
$ cd php-5.1.5 
$ mkdir /usr/local/php 
$ ./configure --prefix=/usr/local/php --with-zlib --with-xml --with-xsl \
--with-mysql=/usr/local/mysql --with-apxs2=/Library/Apache2/bin/apxs 
$ make 
$ sudo make install 
$ cp php.ini-dist /usr/local/php/lib/php.ini
Add in httpd.conf (found in Library/Apache2/conf):
  • AddType application/x-httpd-php .php .phtml
  • AddType application/x-httpd-php-source .phps
Launch Apache with sudo /Library/Apache2/bin/apachectl start. Thanks to bofh for the help with this one...
    •    
  • Currently 2.75 / 5
  You rated: 4 / 5 (4 votes cast)
 
[26,186 views]  

10.4: Build Apache 2.2.3, php 5.1.15 and mysql 5.0.24 | 9 comments | Create New Account
Click here to return to the '10.4: Build Apache 2.2.3, php 5.1.15 and mysql 5.0.24' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Sorry, won't work.
Authored by: Chas on Aug 29, '06 07:59:58AM

Excuse me but your tip cannot work. wget is not installed with the Developer Tools , IIRC it has never shipped with 10.4. You must have added wget to your configuration.

Try rewriting your tip with "curl" which replaced wget quite a while ago.



[ Reply to This | # ]
10.4: Build Apache 2.2.3, php 5.1.15 and mysql 5.0.24
Authored by: jaguarcy on Aug 29, '06 10:32:46AM
Why not install Darwin Ports, and then install Apache, PHP and MySQL using the detailed info found at the Darwin Ports wiki?
It seems much nicer (as it doesn't overwrite anything in the system, nor does it install anything in any system directory as it uses its own), plus you get the multitude of available ports to choose from... And upgrading couldn't be easier!

[ Reply to This | # ]
Make that MacPorts, not DarwinPorts
Authored by: jaguarcy on Aug 29, '06 11:19:45AM

Apparently DarwinPorts was just this month renamed to MacPorts... I guess I've been out of the loop :)



[ Reply to This | # ]
10.4: Build Apache 2.2.3, php 5.1.15 and mysql 5.0.24
Authored by: cp420 on Aug 31, '06 08:03:26AM

I agree here. Just use MacPorts (DarwinPorts) or fink to handle all this in it's own little world.



[ Reply to This | # ]
10.4: Build Apache 2.2.3, php 5.1.15 and mysql 5.0.24
Authored by: macgruder on Aug 31, '06 08:30:49AM

The Darwin Ports install isn't MySQL 5.

Personally I think this is best
1. As the hint, use the package for MySQL
2. Use Darwin Ports / Mac Ports for Apache (special configs not so necessary)
3. Do a source install on PHP (you get an up-to-date version, more configure options, and the configure works well on OS X)



[ Reply to This | # ]
10.4: Build Apache 2.2.3, php 5.1.15 and mysql 5.0.24
Authored by: badger brigade on Aug 29, '06 11:58:02AM
Personally, I'm using
./configure --enable-mods-shared=all
for Apache,
./configure --prefix=/usr/local/mysql --with-unix-socket-path=/var/mysql/mysql.sock
for MySQL and
./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql --with-openssl --with-zlib --with-bz2 --with-curl --enable-exif --with-gd --enable-ftp --enable-soap --enable-sqlite-utf8 --with-xsl --enable-fastcgi --enable-mbstring --with-mysqli
for PHP5.

[ Reply to This | # ]
10.4: Build Apache 2.2.3, php 5.1.15 and mysql 5.0.24
Authored by: JAustin on Aug 29, '06 05:08:12PM

and if you run the following commands

mv /usr/sbin/apachectl /usr/sbin/apachectl-old
ln <path to apache2>/bin/apachectl /usr/sbin/apachectl


and change the following in your http.conf

user: apache ---> www
group: apache --->www

add the following lines toward the top

#<IfModule !mpm_netware.c>
PidFile /private/var/run/httpd.pid
#</IfModule>


this will allow you to start and stop your apache 2.2.3 from the sharing preferencepane.



[ Reply to This | # ]
10.4: Build Apache 2.2.3, php 5.1.15 and mysql 5.0.24
Authored by: badger brigade on Aug 30, '06 04:11:38AM

That's handy, it seems to start up ok now from the Sharing Preference pane, though the message seems to be stuck on "Web Sharing starting up..." (the httpd processes are actually running fine).



[ Reply to This | # ]
10.4: Build Apache 2.2.3, php 5.1.15 and mysql 5.0.24
Authored by: pepi on Sep 03, '06 01:15:52PM

This surely can be used with Mac OS X Server as well. But what about OD integration? Can this be done as well? I don't know if Apple's special Apache Modules that come with X Server are available under the Apple public license.

Could one also integrate the DAVsvn (for Subversion) and CalDAV (from the new Calendar Server project) both of which base on WebDAV into this?
Pepi



[ Reply to This | # ]