httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Hartill <hart...@ooo.lanl.gov>
Subject Re: installing apache docs
Date Fri, 19 Apr 1996 10:39:14 GMT
 
> There's something like that in my book, I'm sure you're all happy to hear 
> :)
> 
> Actually, on a related note: my wife Laura has joined the list (nepotism! 
> aaaa!) and is interested not so much in coding but in helping improve the
> documentation on the web site, perhaps even the documentation with the
> distributions.  She is a tech writer right now for Infoseek, and before that
> for Lucid/Roguewave, and predates me on the net by a couple of years at least
> :) She's spending the next week or so going through the docs, the archives,
> etc... anyways, she's laura@hyperreal.com. 

Okay here's one bit oif HTML that I wrote...

It sets an unfortunate precedent.. it's aimed at the most clueless of
users, so subsequent documentation will need to dumb down to this level.


<HTML>
<HEAD>
<TITLE>Compiling Apache</TITLE>
</HEAD>
<BODY>
<H1>Compiling apache</H1>
<P>We first assume that you've <A HREF="downloading.html">downloaded the source</A>
and have a file named <B>apache_X.tar.gz</B> (where X is some version name/number
information).</P>

<P>The first thing to do is unpack the source distribution. There are lots of ways
to do this depending on the tools you have available. Here are two examples..</P>

<HR>
<DL>
<DT><CODE>zcat apache_X.tar.gz | tar xvf -</CODE></DT>
  <DD></DD>
<DT><CODE>gunzip apache_X.tar.gz ; tar xvf apache_X.tar</DT>
  <DD></DD>
</DL>
<HR>

<P>Both of the above commands will show the apache source being unpacked into
a new directory. Typically, you'll see something that resembles..</P>
<HR>
<PRE>
x apache_X/src/CHANGES, 40918 bytes, 80 tape blocks
    :           :           :              :
x apache_X/support/httpd.1m, 4175 bytes, 9 tape blocks
x apache_X/support/httpd_monitor.c, 8661 bytes, 17 tape blocks
x apache_X/support/inc2shtml.c, 2503 bytes, 5 tape blocks
x apache_X/support/log_server_status, 4269 bytes, 9 tape blocks
x apache_X/support/logresolve.c, 8622 bytes, 17 tape blocks
x apache_X/support/rotatelogs.c, 1751 bytes, 4 tape blocks
x apache_X/support/unescape.c, 1911 bytes, 4 tape blocks
</PRE>
<HR>
</P>

<P>The next step is to change to the source directory to compile the
source...<BR>
<CODE>cd apache_X/src/</CODE>
</P>

<P>There are two files that are important to us now, <CODE>Configuration</CODE>
and <CODE>Configure</CODE><BR>
<PRE>ls Conf*
Configuration.tmpl   Configure
</PRE>
</P>

<P>If a file called <CODE>Configuration</CODE> doesn't exist, you'll need
to
use the template (<CODE>Configuration.tmpl</CODE>) by copying it...<BR>
<PRE>
cp Configuration.tmpl Configuration
ls Conf*
Configuration Configuration.tmpl   Configure
</PRE>
</P>

<P><CODE>Configuration</CODE> contains information about the system you
are using (the operating system, compiler etc) and information about what
modules (standard ones and additional optional ones). We now need to edit
this configuration file</P>

<P><I>Note: like other Apache configuration files, <CODE>Configuration</CODE>

contains comments. A comment is a line which starts with a <B>#</B> (hash)
sybmol. You can add your own comment lines if you so wish.</I></P>

<P>Usually, the first thing in the <CODE>Configuration</CODE> file that
needs our attention is the <I>compiler</I> setting.</P>

<PRE>
# What to call the compiler:  For normal machines with ANSI compilers
# CC= cc
# For Suns or other non-ANSI platforms. Please make sure your gcc is
# 2.0 or later, as 1.40 seems to create bad code for the Sun 4.
CC= gcc
</PRE>

<P>The Apache developers recommend you use the <B>gcc compiler</B>, but
other ANSI compilers should work just fine. If your compiler name is
<CODE>cc</CODE> then you'd need to change this setting, e.g<BR>
<PRE>
# What to call the compiler:  For normal machines with ANSI compilers
# CC= cc
# For Suns or other non-ANSI platforms. Please make sure your gcc is
# 2.0 or later, as 1.40 seems to create bad code for the Sun 4.
#CC= gcc
CC= cc
</PRE>
Note: we've made the default option a comment by adding a <B>#</B>, this
is a good idea since we now have a reminder of the original value.</P>

<P>There are some other compiler options (e.g. <CODE>CFLAGS</CODE>, <CODE>LFLAGS</CODE>)
which can be set. If you do not know how to set these correctly, leave them alone.
Default settings often work fine.</P>

<P>The next thing to do is identify your system (operating system name). The
<CODE>Configuration</CODE> file uses the settings <CODE>AUX_CFLAGS</CODE>
and 
<CODE>AUX_LIBS</CODE> to achieve this. A large colleciton of systems are
already covered in this file and the settings are commented out, e.g.<BR>
<PRE>
# For NetBSD/FreeBSD/BSDI 2.x
# -m486 only if you are running on Intel 486/586
#AUX_CFLAGS= -m486
# BSDI doesn't need -lcrypt
#AUX_LIBS= -lcrypt
</PRE>
</P>

<P>If you are using NetBSD/FreeBSD/BSDI 2.x then you'd uncomment (remove the <B>#</B>)
from the lines that set <CODE>AUX_CFLAGS</CODE> and <CODE>AUX_LIBS</CODE>...<BR>
<PRE>
# For NetBSD/FreeBSD/BSDI 2.x
# -m486 only if you are running on Intel 486/586
AUX_CFLAGS= -m486
# BSDI doesn't need -lcrypt
AUX_LIBS= -lcrypt
</PRE>
</P>

<P>The remainder of the <CODE>Configuration</CODE> file defines which modules
will be compiled into the binary executable file. If you're at all unsure
which modules you need, stick with the defaults (i.e. change nothing).
</P>

<P>Modules are added with a line,
<PRE>
Module name object-filename
</PRE>
e.g.
<PRE>
Module cgi_module          mod_cgi.o
</PRE>
</P>

<P><CODE>cgi_module</CODE> is Apache's CGI (Common Gateway Interface) module.
It's
the module that lets you run programs/scripts from Apache. <CODE>cgi_module</CODE>
is enabled by default, but if (in the very unlikely event that) you wanted to
disable that module, you would only need to comment it out (<B>#</B>).</P>

<P>The standard <CODE>Configuration</CODE> contains some commented out module
references, e.g.
<PRE>
# Optional authentication modules, which should only be
# uncommented out if you have the neccessary system support.
# (if you don't have the decade-old "new" DBM libs, for example)

# Module dbm_auth_module  mod_auth_dbm.o
# Module db_auth_module   mod_auth_db.o
# Module msql_auth_module mod_auth_msql.o
</PRE>
</P>

<P>Say, for example, you wanted to use DBM authentication (password protection) you
can uncomment the <CODE>dbm_auth_module</CODE> line, e.g.
<PRE>
# Optional authentication modules, which should only be
# uncommented out if you have the neccessary system support.
# (if you don't have the decade-old "new" DBM libs, for example)

# Module dbm_auth_module  mod_auth_dbm.o
Module db_auth_module   mod_auth_db.o
# Module msql_auth_module mod_auth_msql.o
</PRE>
</P>

<P>When you become more familiar with Apache modules, you'll probably want
to change the defaults, but for now you should just stick with the defaults.</P>

<P>Having finished making changes to the <CODE>Configuration</CODE> file,
you
should save it and run <CODE>Configure</CODE> e.g.
<PRE>
./Configure
Using 'Configuration' as config file
</PRE>
</P>

<P><CODE>Configure</CODE> reads the <CODE>Configuration</CODE>
file and creates
a new <CODE>Makefile</CODE> (and other auxiliary files). If any errors are reported,
edit <CODE>Configuration</CODE> and repeat the process.</P>

<P>Now, you should have a <B>Makefile</B>
<PRE>
ls Make*
Makefile        Makefile.bak    Makefile.tmpl
</PRE>
which can now be used to compile an Apache binary. To do this, use the 
command <CODE>make</CODE> (<CODE>gmake</CODE> on some systems). The
results
will look something like the following...<BR>
<PRE>
make
        gcc -c -O2 -DHPUX alloc.c
        gcc -c -O2 -DHPUX http_main.c
        gcc -c -O2 -DHPUX http_core.c
        gcc -c -O2 -DHPUX http_config.c
        gcc -c -O2 -DHPUX http_request.c
        gcc -c -O2 -DHPUX http_log.c
        gcc -c -O2 -DHPUX http_protocol.c
        gcc -c -O2 -DHPUX rfc1413.c
        gcc -c -O2 -DHPUX util.c
        gcc -c -O2 -DHPUX util_script.c
        gcc -c -O2 -DHPUX modules.c
        gcc -c -O2 -DHPUX buff.c
        gcc -c -O2 -DHPUX md5c.c
        gcc -c -O2 -DHPUX util_md5.c
        gcc -c -O2 -DHPUX explain.c
        gcc -c -O2 -DHPUX mod_mime.c
        gcc -c -O2 -DHPUX mod_access.c
        gcc -c -O2 -DHPUX mod_auth.c
        gcc -c -O2 -DHPUX mod_negotiation.c
        gcc -c -O2 -DHPUX mod_include.c
        gcc -c -O2 -DHPUX mod_dir.c
        gcc -c -O2 -DHPUX mod_cgi.c
        gcc -c -O2 -DHPUX mod_userdir.c
        gcc -c -O2 -DHPUX mod_alias.c
        gcc -c -O2 -DHPUX mod_log_common.c
        gcc -c -O2 -DHPUX mod_asis.c
        gcc -c -O2 -DHPUX mod_imap.c
        gcc -c -O2 -DHPUX mod_actions.c
        gcc -c -O2 -DHPUX mod_cern_meta.c
        gcc -c -O2 -DHPUX mod_env.c
        gcc -c -O2 -DHPUX mod_auth_anon.c
        gcc -c -O2 -DHPUX mod_digest.c
        gcc -c -O2 -DHPUX mod_status.c
        gcc   -o httpd alloc.o http_main.o http_core.o http_config.o http_request.o
http_log.o http_protocol.o rfc1413.o util.o util_script.o modules.o buff.o
md5c.o util_md5.o explain.o mod_mime.o  mod_access.o  mod_auth.o 
mod_negotiation.o  mod_include.o  mod_dir.o  mod_cgi.o  mod_userdir.o 
mod_alias.o  mod_log_common.o  mod_asis.o  mod_imap.o  mod_actions.o
mod_cern_meta.o  mod_env.o  mod_auth_anon.o  mod_digest.o  mod_status.o  
</PRE>
</P>
<P>If you see warnings they can probably be ignored. If you see error messages
then you'll need to correct the problem before running <CODE>make</CODE> again.
Some errors will highlight incorrect settings in the <CODE>Configuration</CODE>
file, others might indicate a problem with your compiler installation.</P>

<P><B>If you hit a compilation problem, please seek local help first. Consult
the relevant USENET newsgroup or your compiler vendor. Avoid contacting the
Apache developers unless you know that there's a problem with Apache.</B></P>

<P>After successful compilation, a binary (executable file) is left in the
current directory, the name of the file is <CODE>httpd</CODE> (HTTP Daemon).
</P>


</BODY>
</HTML>


Mime
View raw message