From: pcs Date: Wed, 19 Feb 1997 09:55:17 +0000 (+0000) Subject: Expanded the compile and install documentation. Added description X-Git-Tag: APACHE_1_2b7~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4e07edc0878137c70302172e5815155e2c21408e;p=apache Expanded the compile and install documentation. Added description of starting and stopping httpd git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@77637 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/install.html b/docs/manual/install.html index 4c255ef5d7..a9b7619b9d 100644 --- a/docs/manual/install.html +++ b/docs/manual/install.html @@ -6,112 +6,233 @@ -

Compiling and Installing Apache 1.2

+ +

Compiling and Installing Apache 1.2

+ If you wish to download and install an earlier version of Apache please -read Compiling and Installing Apache 1.1. +read Compiling and Installing Apache 1.1. + +

Downloading Apache

-

Downloading Apache

Information on the latest version of Apache can be found on the Apache -web server at -http://www.apache.org/. -This will list the current release, -any more recent beta-test release, together with details of mirror -web and anonymous ftp sites. +web server at http://www.apache.org/. This will +list the current release, any more recent beta-test release, together +with details of mirror web and anonymous ftp sites. + +

+ +If you downloaded a binary distribution, skip to Installing Apache. Otherwise read the next section +for how to compile the server.

Compiling Apache

-This release of Apache supports the notion of `optional modules'. -However, the server has to know which modules are compiled into it, in -order for those modules to be effective; this requires generation of a -short bit of code (`modules.c') which simply has a list of them. -

-It is also necessary to choose the correct options for your platform. - -To do this: -

    -
  1. -Copy the file "Configuration.tmpl" to -"Configuration" and then edit -"Configuration". This contains the list and settings of various -"Rules" and an additional section at the bottom which -lists the modules which have been compiled in, and also names the -files containing them. You will need to: -
      -

    • Adjust the Rules and EXTRA_CFLAGS|LIBS|LFLAGS|INCLUDES if - you feel so inclined. - -

    • Uncomment lines corresponding to those optional modules you wish - to include (among the Module lines at the bottom of the file), - or add new lines corresponding to custom modules you have written. - (See API.html for preliminary docs on how to do that). -

    - Note that DBM auth has to be explicitly configured in, if you want - it --- just uncomment the corresponding line. - - -

  2. Run the "Configure" script: -
    -      % Configure
    -      Using 'Configuration' as config file
    -       + configured for  platform
    -       + setting C compiler to  *
    -       + setting C compiler optimization-level to  *
    -      %
    -
    - This generates new versions of the Makefile and of modules.c. (If - you want to maintain multiple configurations, you can say, e.g., -
    -      % Configure -file Configuration.ai
    -      Using alternate config file Configuration.ai
    -       + configured for  platform
    -       + setting C compiler to  *
    -       + setting C compiler optimization-level to  *
    -      % 
    -

    -*: Depending on Configuration and your system, Configure - make not print these lines. That's OK - -

  3. Type "make". -

    + +Compiling Apache consists of three steps: Firstly select which Apache +modules you want to include into the server. Secondly create a +configuration for your operating system. Thirdly compile the +executable. +

    + +All configuration of Apache is performed in the src +directory of the Apache distribution. Change into this directory. + +

      +
    1. + Select modules to compile into Apache in the + Configuration file. Uncomment lines corresponding to + those optional modules you wish to include (among the Module lines + at the bottom of the file), or add new lines corresponding to + additional modules you have downloaded or written. (See API.html for preliminary docs on how to + write Apache modules). Advanced users can comment out some of the + default modules if they are sure they will not need them (be careful + though, since many of the default modules are vital for the correct + operation and security of the server). +

      + + You should also read the instructions in the Configuration + file to see if you need to set any of the Rule lines. + + +

    2. + Configure Apache for your operating system. Normally you can just + type run the Configure script as given below. However + if this fails or you have any special requirements (e.g. to include + an additional library required by an optional module) you might need + to edit one or more of the following options in the + Configuration file: + EXTRA_CFLAGS, LIBS, LFLAGS, INCLUDES. +

      + + Run the Configure script: +

      +
      +    % Configure
      +    Using 'Configuration' as config file
      +     + configured for <whatever> platform
      +     + setting C compiler to <whatever> *
      +     + setting C compiler optimization-level to <whatever> *
      +    %
      +   
      +
      + + (*: Depending on Configuration and your system, Configure + make not print these lines. That's OK).

      + + This generates a Makefile for use in stage 3. It also creates a + Makefile in the support directory, for compilation of the optional + support programs. +

      + + (If you want to maintain multiple configurations, you can give a + option to Configure to tell it to read an alternative + Configuration file, such as Configure -file + Configuration.ai). +

      + +

    3. + Type make. +
    + The modules we place in the Apache distribution are the ones we have tested and are used regularly by various members of the Apache development group. Additional modules contributed by members or third -parties with specific needs or functions are available at -. -There are -instructions on that page for linking these modules into the +parties with specific needs or functions are available at <URL:http://www.apache.org/dist/contrib/modules/>. +There are instructions on that page for linking these modules into the core Apache code. -
-

Installing Apache

-After compilation, you will have a binary called `httpd' in the -src/ directory. A binary distribution of Apache will supply this -file. -

-The next step is to edit the configuration files for the server. In -the subdirectory called `conf' you should find distribution versions -of the three configuration files: srm.conf-dist, -access.conf-dist and httpd.conf-dist. Copy them to -srm.conf, access.conf and httpd.conf -respectively. -

-First edit httpd.conf. This sets up general attributes about the -server; the port number, the user it runs as, etc. Next edit the -srm.conf file; this sets up the root of the document tree, -special functions like server-parsed HTML or internal imagemap parsing, etc. -Finally, edit the access.conf file to at least set the base cases -of access. -

-Finally, make a call to httpd, with a -f to the full path to the -httpd.conf file. I.e., the common case: -

- /usr/local/etc/apache/src/httpd -f /usr/local/etc/apache/conf/httpd.conf -
-The server should be now running. -

-By default the srm.conf and access.conf files are -located by name; to specifically call them by other names, use the -AccessConfig and -ResourceConfig directives in -httpd.conf. + +

Installing Apache

+ +You will have a binary file called httpd in the +src directory. A binary distribution of Apache will +supply this file.

+ +The next step is to install the program and configure it. Apache is +designed to be configured and run from the same set of directories +where it is compiled. If you want to run it from somewhere else, make +a directory and copy the conf, logs and +icons directories into it.

+ +The next step is to edit the configuration files for the server. This +consists of setting up various directives in up to three +central configuration files. By default, these files are located in +the conf directory and are called srm.conf, +access.conf and httpd.conf. To help you get +started there are same files in the conf directory of the +distribution, called srm.conf-dist, +access.conf-dist and httpd.conf-dist. Copy +or rename these files to the names without the -dist. +Then edit each of the files. Read the comments in each file carefully. +Failure to setup these files correctly could lead to your server not +working or being insecure. You should also have an additional file in +the conf directory called mime.types. This +file usually does not need editing. + +

+ +First edit httpd.conf. This sets up general attributes +about the server: the port number, the user it runs as, etc. Next +edit the srm.conf file; this sets up the root of the +document tree, special functions like server-parsed HTML or internal +imagemap parsing, etc. Finally, edit the access.conf +file to at least set the base cases of access. + +

+ +In addition to these three files, the server behavior can be configured +on a directory-by-directory basis by using .htaccess +files in directories accessed by the server. + +

Starting and Stopping the Server

+ +To start the server, simply run httpd. This will look for +httpd.conf in the location compiled into the code (by +default /usr/locale/etc/httpd/conf/httpd.conf). If +this file is somewhere else, you can give the real +location with the -f argument. For example: + +
+    /usr/local/etc/apache/src/httpd -f /usr/local/etc/apache/conf/httpd.conf
+
+ +If all goes well this will return to the command prompt almost +immediately. This indicates that the server is now up and running. If +anything goes wrong during the initiallisation of the server you will +see an error message on the screen. + +If the server started ok, you can now use your browser to +connect to the server and read the documentation. If you are running +the browser on the same machine as the server and using the default +port of 80, a suitable URL to enter into your browser is + +
+    http://localhost/
+
+ +

+ +Note that when the server starts it will create a number of +child processes to handle the requests. If you started Apache +as the root user, the parent process will continue to run as root +while the children will change to the user as given in the httpd.conf +file. + +

+ +If when you run httpd it complained about being unable to +"bind" to an address, then either some other process is already using +the port you have configured Apache to use, or you are running httpd +as a normal user but trying to use port below 1024 (such as the +default port 80). + +

+ +If the server is not running, read the error message displayed +when you run httpd. You should also check the server +error_log for additional information (with the default configuration, +this will be located in the file error_log in the +logs directory). + +

+ +If you want your server to continue running after a system reboot, you +should add a call to httpd to your system startup files +(typically rc.local or a file in an +rc.N directory). This will start Apache as root. +Before doing this ensure that your server is properly configured +for security and access restrictions. + +

+ +To stop Apache send the parent process a TERM signal. The PID of this +process is written to the file httpd.pid in the +logs directory (unless configured otherwise). Do not +attempt to kill the child processes because they will be renewed by +the parent. A typical command to stop the server is: + +

+    kill -TERM `cat /usr/local/etc/apache/logs/httpd.pid`
+
+ +

+ +For more information about Apache command line options, configuration +and log files, see Starting Apache. For a +reference guide to all Apache directives supported by the distributed +modules, see the Apache directives. + +

Compiling Support Programs

+ +In addition to the main httpd server which is compiled +and configured as above, Apache includes a number of support programs. +These are not compiled by default. The support programs are in the +support directory of the distribution. To compile +the support programs, change into this directory and type +
+    make
+
diff --git a/docs/manual/install.html.en b/docs/manual/install.html.en index 4c255ef5d7..a9b7619b9d 100644 --- a/docs/manual/install.html.en +++ b/docs/manual/install.html.en @@ -6,112 +6,233 @@ -

Compiling and Installing Apache 1.2

+ +

Compiling and Installing Apache 1.2

+ If you wish to download and install an earlier version of Apache please -read Compiling and Installing Apache 1.1. +read Compiling and Installing Apache 1.1. + +

Downloading Apache

-

Downloading Apache

Information on the latest version of Apache can be found on the Apache -web server at -http://www.apache.org/. -This will list the current release, -any more recent beta-test release, together with details of mirror -web and anonymous ftp sites. +web server at http://www.apache.org/. This will +list the current release, any more recent beta-test release, together +with details of mirror web and anonymous ftp sites. + +

+ +If you downloaded a binary distribution, skip to Installing Apache. Otherwise read the next section +for how to compile the server.

Compiling Apache

-This release of Apache supports the notion of `optional modules'. -However, the server has to know which modules are compiled into it, in -order for those modules to be effective; this requires generation of a -short bit of code (`modules.c') which simply has a list of them. -

-It is also necessary to choose the correct options for your platform. - -To do this: -

    -
  1. -Copy the file "Configuration.tmpl" to -"Configuration" and then edit -"Configuration". This contains the list and settings of various -"Rules" and an additional section at the bottom which -lists the modules which have been compiled in, and also names the -files containing them. You will need to: -
      -

    • Adjust the Rules and EXTRA_CFLAGS|LIBS|LFLAGS|INCLUDES if - you feel so inclined. - -

    • Uncomment lines corresponding to those optional modules you wish - to include (among the Module lines at the bottom of the file), - or add new lines corresponding to custom modules you have written. - (See API.html for preliminary docs on how to do that). -

    - Note that DBM auth has to be explicitly configured in, if you want - it --- just uncomment the corresponding line. - - -

  2. Run the "Configure" script: -
    -      % Configure
    -      Using 'Configuration' as config file
    -       + configured for  platform
    -       + setting C compiler to  *
    -       + setting C compiler optimization-level to  *
    -      %
    -
    - This generates new versions of the Makefile and of modules.c. (If - you want to maintain multiple configurations, you can say, e.g., -
    -      % Configure -file Configuration.ai
    -      Using alternate config file Configuration.ai
    -       + configured for  platform
    -       + setting C compiler to  *
    -       + setting C compiler optimization-level to  *
    -      % 
    -

    -*: Depending on Configuration and your system, Configure - make not print these lines. That's OK - -

  3. Type "make". -

    + +Compiling Apache consists of three steps: Firstly select which Apache +modules you want to include into the server. Secondly create a +configuration for your operating system. Thirdly compile the +executable. +

    + +All configuration of Apache is performed in the src +directory of the Apache distribution. Change into this directory. + +

      +
    1. + Select modules to compile into Apache in the + Configuration file. Uncomment lines corresponding to + those optional modules you wish to include (among the Module lines + at the bottom of the file), or add new lines corresponding to + additional modules you have downloaded or written. (See API.html for preliminary docs on how to + write Apache modules). Advanced users can comment out some of the + default modules if they are sure they will not need them (be careful + though, since many of the default modules are vital for the correct + operation and security of the server). +

      + + You should also read the instructions in the Configuration + file to see if you need to set any of the Rule lines. + + +

    2. + Configure Apache for your operating system. Normally you can just + type run the Configure script as given below. However + if this fails or you have any special requirements (e.g. to include + an additional library required by an optional module) you might need + to edit one or more of the following options in the + Configuration file: + EXTRA_CFLAGS, LIBS, LFLAGS, INCLUDES. +

      + + Run the Configure script: +

      +
      +    % Configure
      +    Using 'Configuration' as config file
      +     + configured for <whatever> platform
      +     + setting C compiler to <whatever> *
      +     + setting C compiler optimization-level to <whatever> *
      +    %
      +   
      +
      + + (*: Depending on Configuration and your system, Configure + make not print these lines. That's OK).

      + + This generates a Makefile for use in stage 3. It also creates a + Makefile in the support directory, for compilation of the optional + support programs. +

      + + (If you want to maintain multiple configurations, you can give a + option to Configure to tell it to read an alternative + Configuration file, such as Configure -file + Configuration.ai). +

      + +

    3. + Type make. +
    + The modules we place in the Apache distribution are the ones we have tested and are used regularly by various members of the Apache development group. Additional modules contributed by members or third -parties with specific needs or functions are available at -. -There are -instructions on that page for linking these modules into the +parties with specific needs or functions are available at <URL:http://www.apache.org/dist/contrib/modules/>. +There are instructions on that page for linking these modules into the core Apache code. -
-

Installing Apache

-After compilation, you will have a binary called `httpd' in the -src/ directory. A binary distribution of Apache will supply this -file. -

-The next step is to edit the configuration files for the server. In -the subdirectory called `conf' you should find distribution versions -of the three configuration files: srm.conf-dist, -access.conf-dist and httpd.conf-dist. Copy them to -srm.conf, access.conf and httpd.conf -respectively. -

-First edit httpd.conf. This sets up general attributes about the -server; the port number, the user it runs as, etc. Next edit the -srm.conf file; this sets up the root of the document tree, -special functions like server-parsed HTML or internal imagemap parsing, etc. -Finally, edit the access.conf file to at least set the base cases -of access. -

-Finally, make a call to httpd, with a -f to the full path to the -httpd.conf file. I.e., the common case: -

- /usr/local/etc/apache/src/httpd -f /usr/local/etc/apache/conf/httpd.conf -
-The server should be now running. -

-By default the srm.conf and access.conf files are -located by name; to specifically call them by other names, use the -AccessConfig and -ResourceConfig directives in -httpd.conf. + +

Installing Apache

+ +You will have a binary file called httpd in the +src directory. A binary distribution of Apache will +supply this file.

+ +The next step is to install the program and configure it. Apache is +designed to be configured and run from the same set of directories +where it is compiled. If you want to run it from somewhere else, make +a directory and copy the conf, logs and +icons directories into it.

+ +The next step is to edit the configuration files for the server. This +consists of setting up various directives in up to three +central configuration files. By default, these files are located in +the conf directory and are called srm.conf, +access.conf and httpd.conf. To help you get +started there are same files in the conf directory of the +distribution, called srm.conf-dist, +access.conf-dist and httpd.conf-dist. Copy +or rename these files to the names without the -dist. +Then edit each of the files. Read the comments in each file carefully. +Failure to setup these files correctly could lead to your server not +working or being insecure. You should also have an additional file in +the conf directory called mime.types. This +file usually does not need editing. + +

+ +First edit httpd.conf. This sets up general attributes +about the server: the port number, the user it runs as, etc. Next +edit the srm.conf file; this sets up the root of the +document tree, special functions like server-parsed HTML or internal +imagemap parsing, etc. Finally, edit the access.conf +file to at least set the base cases of access. + +

+ +In addition to these three files, the server behavior can be configured +on a directory-by-directory basis by using .htaccess +files in directories accessed by the server. + +

Starting and Stopping the Server

+ +To start the server, simply run httpd. This will look for +httpd.conf in the location compiled into the code (by +default /usr/locale/etc/httpd/conf/httpd.conf). If +this file is somewhere else, you can give the real +location with the -f argument. For example: + +
+    /usr/local/etc/apache/src/httpd -f /usr/local/etc/apache/conf/httpd.conf
+
+ +If all goes well this will return to the command prompt almost +immediately. This indicates that the server is now up and running. If +anything goes wrong during the initiallisation of the server you will +see an error message on the screen. + +If the server started ok, you can now use your browser to +connect to the server and read the documentation. If you are running +the browser on the same machine as the server and using the default +port of 80, a suitable URL to enter into your browser is + +
+    http://localhost/
+
+ +

+ +Note that when the server starts it will create a number of +child processes to handle the requests. If you started Apache +as the root user, the parent process will continue to run as root +while the children will change to the user as given in the httpd.conf +file. + +

+ +If when you run httpd it complained about being unable to +"bind" to an address, then either some other process is already using +the port you have configured Apache to use, or you are running httpd +as a normal user but trying to use port below 1024 (such as the +default port 80). + +

+ +If the server is not running, read the error message displayed +when you run httpd. You should also check the server +error_log for additional information (with the default configuration, +this will be located in the file error_log in the +logs directory). + +

+ +If you want your server to continue running after a system reboot, you +should add a call to httpd to your system startup files +(typically rc.local or a file in an +rc.N directory). This will start Apache as root. +Before doing this ensure that your server is properly configured +for security and access restrictions. + +

+ +To stop Apache send the parent process a TERM signal. The PID of this +process is written to the file httpd.pid in the +logs directory (unless configured otherwise). Do not +attempt to kill the child processes because they will be renewed by +the parent. A typical command to stop the server is: + +

+    kill -TERM `cat /usr/local/etc/apache/logs/httpd.pid`
+
+ +

+ +For more information about Apache command line options, configuration +and log files, see Starting Apache. For a +reference guide to all Apache directives supported by the distributed +modules, see the Apache directives. + +

Compiling Support Programs

+ +In addition to the main httpd server which is compiled +and configured as above, Apache includes a number of support programs. +These are not compiled by default. The support programs are in the +support directory of the distribution. To compile +the support programs, change into this directory and type +
+    make
+