I didn't want to ruin the installation of Apache2.2 that comes native on Leopard, so I started from scratch:
cd /usr/localNow we have a new apache install in your /usr/local directory. If you want to connect this installation to your usual web directory on your mac, you need to edit your httpd.conf to direct your web root folder to /Library/WebServer/Documents. You do this by executing the following commands:
mkdir src
curl -O http://www.mirrorgeek.com/apache.org/httpd/httpd-2.2.8.tar.gz
tar -zxvf httpd-2.2.8.tar.gz # a bunch of output will fly by; that's normal
cd httpd-2.2.8
./compile --enable-so --prefix=/usr/local/apache2 # a ton more output will fly by
make
sudo make install
sudo vi /usr/local/apache2/conf/httpd.conf
Change DocumentRoot "/usr/local/apache2/htdocs" to: DocumentRoot "/Library/WebServer/Documents"
Next, changeto
issue the vi command :wq
Your Apache Installation should be set to go now.
Before we can install php, we need to cimpile the IMAP c libraries. Go to and download these libraries at ftp://ftp.cac.washington.edu/imap/ . Then, move them to your source directory with the following command:
mv ~/Downloads/[your-imap-download] /usr/local/src
./compile --prefix=/usr/local/imap
make
sudo make install
When this finishes, you can install php
PHP Installation:
Go to http://us3.php.net/get/php-5.2.5.tar.gz/from/a/mirror and download a package
On Leopard, you would issue the following command to move the package to our source directory:
mv ~/Downloads/php-5.2.5.tar.gz /usr/local/src
Now, we compile:
tar -zcvf php-5.2.5.tar.gz
cd php-5.2.5
./configure --prefix=/usr/local/apache2/php --with-apx2=/usr/local/apache2/bin/apxs --with-imap=/usr/local/imap --with-mysql=/usr/local/mysql
make
sudo make install
Following the completion of this install, you should be able to issue the command:
sudo /usr/local/apache2/bin/apachectl start
and your installation is complete. SugarCRM should recognize the imap libraries and php should run smoothly.
Please note that this is not a particularly secure installation, but will work great for local intranets to keep your users involved with the crm.
Please post comments if you run into trouble.


1 comment:
Thanks for the helpful info! You have a few minor errors that should be changed: When compiling PHP, you have a --with-apx2= argument that should be --with-apxs2=
Also, at the beginning you create a /usr/local/src directory but you don't mention putting the apache source there.
Post a Comment