- Download Unix Source from http://httpd.apache.org/download.cgi.
- Extract the file by issue the following command :
#gunzip http-xxx.tar.gz (Skip this if file extension is .tar)
#tar -xf http-xxx.tar
- Execute following command :
# ./configure –prefix=/opt/apache –enable-mods-shared=most
Note: (Set the prefix directory where you want to install Apache, Eg in this case is /opt/apache) - Issue the following command : # make
- Issue the following command : # make install
- Apache should successfully install in /opt/ folder now.
- To start Apache, go /opt/apache/ then issue this command : # ./apachectl start
- Verify examples at http://localhost, to make sure Apache start successfully 🙂
Note: Please make sure Gnu C Compiler (gcc) is install before compile Apache.
which version of gcc should we use?
GCC Version 2.7.2 is recommended.
For more requirements detail, please go to: http://httpd.apache.org/docs/2.0/install.html