Building and installing Apache 2 on a Mac

Ok Below is a rough guide to get anyone up and going when it comes to building and installing Apache 2 from source. We're gonna do this all from the Terminal found in /Applications/Utilities/Termain.app.

Please note that '$' means new line, don't type this character If you want to know about any of the commands we make from the terminal you can always type "man + command" e.g.

view plain print about
1$ man curl
If you run the above code it should tell you that
curl is a tool to transfer data from or to a server, using one of the supported protocols (HTTP, HTTPS, FTP, FTPS, GOPHER, DICT, TELNET, LDAP or FILE). The command is designed to work without user interaction.

This will also detail the options I use.

Posted: 12-Jun-2007

View: 5856

Permalink: here

Comments

I found the following very helpful when I was building Apache from source on the Mac.

http://www.devshed.com/c/a/Apache/Building-Apache-...

#1 Nathan Mische
12/Jun/07 12:44 PM

Hi Andy,

how did you connect Coldfusion MX 7.02 to your new Apache 2.2 - that failed for me so I switched back to included Apache 1.3...

If you get it to work, maybe you post a step by step tutorial, that would be great.

Thanks.

Ulf

#2 Ulf
12/Jun/07 11:36 PM

Hey Andy,
I am running into a roadblock:
configure: error: no acceptable C compiler found in $PATH
following step 2 after configure
I have been trying to find a gcc but all I cant find a binary (don't have a compiler (-:).
Any thoughts??
D.

#3 doug
01/Sep/07 8:29 AM

@doug silly question, you on a mac? if so which version? You might want to try the following command in the Terminal: "echo $PATH" (without the quotes)

if so what does that return?

#4 Andy Jarrett
03/Sep/07 11:18 PM

Andy, not silly at all -- I am on a mac, converted one week ago (not completely weaned off of my Win box yet). I have a 13" MacBook running 10.4.10. Trying to install Apache from source.

Here is the return from echo $PATH:
/usr/local/bin:/bin:/sbin:/usr/bin:/usr/sbin

Here is the entire transcript from Terminal:

Dougrs-Computer:~ dougr$ curl -O http://apache.mirrors.tds.net/httpd/httpd-2.2.4.ta...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 6216k 100 6216k 0 0 654k 0 0:00:09 0:00:09 --:--:-- 641k
Dougrs-Computer:~ dougr$ gnutar -xzfhttpd-2.2.4.tar.gz
Dougrs-Computer:~ dougr$ cd httpd-2.2.4
Dougrs-Computer:~/httpd-2.2.4 dougr$ sudo ./configure --prefix=/apache2
Password:
checking for chosen layout... Apache
checking for working mkdir -p... yes
checking build system type... i386-apple-darwin8.10.1
checking host system type... i386-apple-darwin8.10.1
checking target system type... i386-apple-darwin8.10.1

Configuring Apache Portable Runtime library ...

checking for APR... reconfig
configuring package in srclib/apr now
checking build system type... i386-apple-darwin8.10.1
checking host system type... i386-apple-darwin8.10.1
checking target system type... i386-apple-darwin8.10.1
Configuring APR library
Platform: i386-apple-darwin8.10.1
checking for working mkdir -p... yes
APR Version: 1.2.8
checking for chosen layout... apr
checking for gcc... no
checking for cc... no
checking for cc... no
checking for cl... no
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.
configure failed for srclib/apr
Dougrs-Computer:~/httpd-2.2.4 dougr$ echo $PATH
/usr/local/bin:/bin:/sbin:/usr/bin:/usr/sbin
Dougrs-Computer:~/httpd-2.2.4 dougr$

Pretty much crying for a compiler eh?
D.

#5 doug
04/Sep/07 6:24 AM

Looks like this is related to my not having everything installed that I need from my install disc. I received this machine from work and found out this morning that the developer tools from the install disk had not been installed. This machine actually was the owners who was running Win from bootcamp and never used the Mac side at all. Anyway, I will look into that today- I bet that will solve the issue because GCC is part of the install.
D.

#6 doug
04/Sep/07 5:09 PM

Hey Andy-That was it!
Thanks,
dougrdotnet

#7 dougrdotnet
05/Sep/07 3:15 AM