PrintLogo

Apache Installation and Configuration




First, get the current Apache distribution from Apache.org, and extract it:

[root@srv-3 src]# ls
apache_1.3.19.tar.gz  bind-9.1.2  bind-9.1.2.tar.gz  webmin-0.85.tar.gz
[root@srv-3 src]# tar -xzf ap*.gz
[root@srv-3 src]#
[root@srv-3 src]# ls
apache_1.3.19         bind-9.1.2         webmin-0.85.tar.gz
apache_1.3.19.tar.gz  bind-9.1.2.tar.gz
[root@srv-3 src]# cd ap*
[root@srv-3 apache_1.3.19]# ls
ABOUT_APACHE  config.layout  INSTALL  Makefile.tmpl     src
Announcement  configure      KEYS     README            WARNING-WIN.TXT
cgi-bin       htdocs         LICENSE  README.configure
conf          icons          logs     README-WIN.TXT

Now, let's configure with the GNU file layout, make, and make install:

[root@srv-3 apache_1.3.19]# ./configure --with-layout=GNU
Configuring for Apache, Version 1.3.19
+ using installation path layout: GNU (config.layout)
Creating Makefile
Creating Configuration.apaci in src
Creating Makefile in src
+ configured for Linux platform
+ setting C compiler to gcc
+ setting C pre-processor to gcc -E
+ checking for system header files
+ adding selected modules
+ checking sizeof various data types
+ doing sanity check on compiler and options
Creating Makefile in src/support
Creating Makefile in src/regex
Creating Makefile in src/os/unix
Creating Makefile in src/ap
Creating Makefile in src/main
Creating Makefile in src/lib/expat-lite
Creating Makefile in src/modules/standard
[root@srv-3 apache_1.3.19]#
[root@srv-3 apache_1.3.19]# make
===> src
make[1]: Entering directory `/usr/local/src/apache_1.3.19'
make[2]: Entering directory `/usr/local/src/apache_1.3.19/src'
===> src/regex
sh ./mkh  -p regcomp.c >regcomp.ih
gcc -I.  -I../os/unix -I../include   -DLINUX=
.
.
.
O_DL_NEEDED `../apaci`%g' 
-e 's%@CFLAGS_SHLIB@%%g' 
-e 's%@LD_SHLIB@%%g' 
-e 's%@LDFLAGS_MOD_SHLIB@%%g' 
-e 's%@LIBS_SHLIB@%%g' && chmod a+x apxs
make[2]: Leaving directory `/usr/local/src/apache_1.3.19/src/support'
<=== src/support
make[1]: Leaving directory `/usr/local/src/apache_1.3.19'
<=== src
[root@srv-3 apache_1.3.19]# make install
make[1]: Entering directory `/usr/local/src/apache_1.3.19'
===> [mktree: Creating Apache installation tree]
./src/helpers/mkdir.sh /usr/local/bin
./src/helpers/mkdir.sh /usr/local/sbin
./src/helpers/mkdir.sh /usr/local/libexec
.
.
.
make[1]: Leaving directory `/usr/local/src/apache_1.3.19'
+--------------------------------------------------------+
| You now have successfully built and installed the      |
| Apache 1.3 HTTP server. To verify that Apache actually |
| works correctly you now should first check the         |
| (initially created or preserved) configuration files   |
|                                                        |
|   /usr/local/etc/httpd/httpd.conf
|                                                        |
| and then you should be able to immediately fire up     |
| Apache the first time by running:                      |
|                                                        |
|   /usr/local/sbin/apachectl start
|                                                        |
| Thanks for using Apache.       The Apache Group        |
|                                http://www.apache.org/  |
+--------------------------------------------------------+

Let's start Apache and verify it works with lynx:

[root@srv-3 apache_1.3.19]#
[root@srv-3 apache_1.3.19]# /usr/local/sbin/apachectl start
/usr/local/sbin/apachectl start: httpd started
[root@srv-3 apache_1.3.19]#
[root@srv-3 apache_1.3.19]# lynx srv-3
Test Page for Apache Installation
If  you  can  see  this, it means that the installation of the Apache web server software on this
system was successful. You may now add content to this directory and replace this page.
________________________________________________
Seeing this instead of the website you expected?
This  page  is  here  because  the  site  administrator has changed the configuration of this web
server.  Please  contact  the  person responsible for maintaining this server with questions. The
Apache Software Foundation, which wrote the web server software this site administrator is using,
has nothing to do with maintaining this site and cannot help resolve configuration issues.
________________________________________________
The Apache documentation has been included with this distribution.
You are free to use the image below on an Apache-powered web server. Thanks for using Apache!
Commands: Use arrow keys to move, '?' for help, 'q' to quit, '<-' to go back.
Arrow keys: Up and Down to move.  Right to follow a link; Left to go back.
H)elp O)ptions P)rint G)o M)ain screen Q)uit /=search [delete]=history list

All works, and we are happy.





This article comes from NetAdminTools:
http://www.netadmintools.com/

The URL for this story is:
http://www.netadmintools.com/art36.html

Copyright 1997-2008 NetAdminTools.com. Read our Terms of Use.