I have just got a Mac which I have been waiting for a long time. Finally, I got it!!!. However, there are lots of stuff I don’t quite understand and to get it done, because I was a PC for over 10 years. This article, I will be install apache2 in Mac OSX.
Install Gcc Compiler on Mac
1. Most websites that I googled don’t tell you this because I think every one should understand this one, but it’s not me. I will start with install gcc.
2. First go to https://connect.apple.com
3. Because every Mac haven’t got installed gcc compiler which is necessary to install apache.
4. Go to Download > Developer Tools and download, xCode
5. Install it!, now your system should have gcc compiler
6. Go to apache and download apache for Unix version.
How to install Apache on Mac
| Download |
1
| $ lynx http://httpd.apache.org/download.cgi |
|
| Extract |
1 2 3
| $ gzip -d httpd-NN.tar.gz
$ tar xvf httpd-NN.tar
$ cd httpd- NN |
|
| Configure |
1
| $ ./configure --prefix=PREFIX |
|
| Compile |
|
| Install |
|
| Customize |
1
| $ vi PREFIX/conf/httpd.conf |
|
| Test |
1
| $ PREFIX/bin/apachectl -k start |
|
I copied this instructions from apache website because I don’t want to miss something!!!.
Reference: http://httpd.apache.org/docs/2.2/install.html