From: Yoshiki Hayashi Date: Fri, 31 May 2002 07:38:49 +0000 (+0000) Subject: New Japanese translation. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f9afdfcf276055f977d137d8fb781d0fcfc5b1ba;p=apache New Japanese translation. Submitted by: Hiroaki KAWAI Reviewed by: Yoshiki Hayashi git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95427 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/install.html b/docs/manual/install.html deleted file mode 100644 index 7495c5aeb6..0000000000 --- a/docs/manual/install.html +++ /dev/null @@ -1,634 +0,0 @@ - - - - - - - Compiling and Installing Apache - - - - - - -

Compiling and Installing

- -

This document covers compilation and installation of Apache - on Unix and Unix-like systems only. For compiling and - installation on Windows, see Using Apache with Microsoft - Windows. For other platforms, see the platform documentation.

- -

Apache 2.0's configuration and installation environment has - changed completely from Apache 1.3. Apache 1.3 used a custom - set of scripts to achieve easy installation. Apache 2.0 now - uses libtool and autoconf to create an environment that looks - like many other Open Source projects.

- - -
- -

Overview for the - impatient

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Download$ lynx - http://www.apache.org/dist/httpd/httpd-2_0_NN.tar.gz -
Extract$ gzip -d httpd-2_0_NN.tar.gz
- $ tar xvf httpd-2_0_NN.tar
Configure$ ./configure --prefix=PREFIX -
Compile$ make
Install$ make install
Customize$ vi PREFIX/conf/httpd.conf
Test$ PREFIX/bin/apachectl start -
- -

NN must be replaced with the current minor version - number, and PREFIX must be replaced with the - filesystem path under which the server should be installed. If - PREFIX is not specified, it defaults to - /usr/local/apache2.

- -

Each section of the compilation and installation process is - described in more detail below, beginning with the requirements - for compiling and installing Apache HTTPD.

- -

Requirements

- -

The following requirements exist for building Apache:

- - - -

Download

- -

Apache can be downloaded from the Apache Software - Foundation download site or from a nearby - mirror.

- -

Version numbers that end in alpha indicate - early pre-test versions which may or may not work. Version - numbers ending in beta indicate more reliable - releases that still require further testing or bug fixing. If - you wish to download the best available production release of - the Apache HTTP Server, you should choose the latest version - with neither alpha nor beta in its - filename.

- -

After downloading, especially if a mirror site is used, it - is important to verify that you have a complete and unmodified - version of the Apache HTTP Server. This can be accomplished by - testing the downloaded tarball against the PGP signature. This, - in turn, is a two step procedure. First, you must obtain the - KEYS file from the Apache distribution - site. (To assure that the KEYS file itself has - not been modified, it may be a good idea to use a file from a - previous distribution of Apache or import the keys from a - public key server.) The keys are imported into your personal - key ring using one of the following commands (depending on your - pgp version):

- -
- $ pgp < KEYS -
- or - -
- $ gpg --import KEYS -
- -

The next step is to test the tarball against the PGP - signature, which should always be obtained from the main Apache - website. The signature file has a filename identical to the - source tarball with the addition of .asc. Then you - can check the distribution with one of the following commands - (again, depending on your pgp version):

- -
- $ pgp httpd-2_0_NN.tar.gz.asc -
- or - -
- $ gpg --verify httpd-2_0_NN.tar.gz.asc -
- You should receive a message like
-
- - -
- Good signature from user "Martin Kraemer - <martin@apache.org>". -
- -

Depending on the trust relationships contained in your key - ring, you may also receive a message saying that the - relationship between the key and the signer of the key cannot - be verified. This is not a problem if you trust the - authenticity of the KEYS file.

- -

Extract

- -

Extracting the source from the Apache HTTPD tarball is a - simple matter of uncompressing, and then untarring:

- -
- $ gzip -d httpd-2_0_NN.tar.gz
- $ tar xvf httpd-2_0_NN.tar
-
- -

This will create a new directory under the current directory - containing the source code for the distribution. You should - cd into that directory before proceeding with - compiling the server.

- -

Configuring the source - tree

- -

The next step is to configure the Apache source tree for - your particular platform and personal requirements. This is - done using the script configure included in the - root directory of the distribution. (Developers downloading the - CVS version of the Apache source tree will need to have - autoconf and libtool installed and - will need to run buildconf before proceeding with - the next steps. This is not necessary for official - releases.)

- -

To configure the source tree using all the default options, - simply type ./configure. To change the default - options, configure accepts a variety of variables - and command line options. Environment variables are generally - placed before the ./configure command, while other - options are placed after. The most important option here is the - location prefix where Apache is to be installed later, because - Apache has to be configured for this location to work - correctly. But there are a lot of other options available for - your pleasure.

- -

For a short impression of what possibilities you have, here - is a typical example which compiles Apache for the installation - tree /sw/pkg/apache with a particular compiler and flags plus - the two additional modules mod_rewrite and mod_speling for - later loading through the DSO mechanism:

- -
- $ CC="pgcc" CFLAGS="-O2" \
- ./configure --prefix=/sw/pkg/apache \
- --enable-rewrite=shared \
- --enable-speling=shared
-
- -

When configure is run it will take several minutes to test - for the availability of features on your system and build - Makefiles which will later be used to compile the server.

- -

The easiest way to find all of the configuration flags for - Apache is to run ./configure --help. What follows is a brief - description of most of the arguments and environment - variables.

- -

Environment - Variables

- -

The autoconf build process uses several environment - variables to configure the build environment. In general, these - variables change the method used to build Apache, but not the - eventual features of the server. These variables can be placed - in the environment before invoking configure, but - it is usually easier to specify them on the - configure command line as demonstrated in the - example above.

- -
-
CC=...
- -
The name of the C compiler command.
- -
CPPFLAGS=...
- -
Miscellaneous C preprocessor and compiler options.
- -
CFLAGS=...
- -
Debugging and optimization options for the C - compiler.
- -
LDFLAGS=...
- -
Miscellaneous options to be passed to the linker.
- -
LIBS=...
- -
Library location information ("-L" and "-l" options) to - pass to the linker.
- -
INCLUDES=...
- -
Header file search directories ("-Idir").
- -
TARGET=... [Default: apache]
- -
Name of the executable which will be built.
- -
NOTEST_CPPFLAGS=...
- -
NOTEST_CFLAGS=...
- -
NOTEST_LDFLAGS=...
- -
NOTEST_LIBS=...
- -
These variables share the same function as their - non-NOTEST namesakes. However, the variables are applied to - the build process only after autoconf has performed its - feature testing. This allows the inclusion of flags which - will cause problems during feature testing, but must be used - for the final compilation.
- -
SHLIB_PATH=...
- -
Options which specify shared library paths for the - compiler and linker.
-
- -

autoconf Output - Options

- -
-
--help
- -
Prints the usage message including all available options, - but does not actually configure anything.
- -
--quiet
- -
Prevents the printing of the usual "checking..." - messages.
- -
--verbose
- -
Prints much more information during the configuration - process, including the names of all the files examined.
-
- -

Pathnames

- -

There are currently two ways to configure the pathnames - under which Apache will install its files. First, you can - specify a directory and have Apache install itself under that - directory in its default locations.

- -
-
--prefix=PREFIX [Default: - /usr/local/apache2]
- -
Specifies the directory under which the Apache files will - be installed.
-
- -

It is possible to specify that architecture-dependent files - should be placed under a different directory.

- -
-
--exec-prefix=EPREFIX [Default: - PREFIX]
- -
Specifies the directory under which - architecture-dependent files will be placed.
-
- -

The second, and more flexible way to configure the install - path locations for Apache is using the - config.layout file. Using this method, it is - possible to separately specify the location for each type of - file within the Apache installation. The - config.layout file contains several example - configurations, and you can also create your own custom - configuration following the examples. The different layouts in - this file are grouped into <Layout - FOO>...</Layout> sections and referred to by - name as in FOO.

- -
-
--enable-layout=LAYOUT
- -
Use the named layout in the config.layout - file to specify the installation paths.
-
- -

Presently it is not possible to mix the - --enable-layout and --prefix options. - Nor is it possible to individually specify detailed pathnames - on the configure command line. If you want just a - basic install, you can simply use the --prefix - option on its own. If you want to customize your install, you - should edit the config.layout file and use the - --enable-layout option.

- -

Modules

- -

Apache is a modular server. Only the most basic - functionality is included in the core server. Extended features - are available in various modules. During the configuration - process, you must select which modules to compile for use with - your server. You can view a list of modules included in - the documentation. Those modules with a status of "Base" are - included by default and must be specifically disabled if you do - not want them. Modules with any other status must be - specifically enabled if you wish to use them.

- -

There are two ways for a module to be compiled and used with - Apache. Modules may be statically compiled, which - means that they are permanently included in the Apache binary. - Alternatively, if your operating system supports Dynamic Shared - Objects (DSOs) and autoconf can detect that support, then - modules may be dynamically compiled. DSO modules are - stored separately from the Apache binary, and may be included - or excluded from the server using the run-time configuration - directives provided by mod_so. - The mod_so is automatically included in the server if any - dynamic modules are included in the compilation. If you would - like to make your server capable of loading DSOs without - actually compiling any dynamic modules, you can explicitly - --enable-so.

- -
-
--enable-MODULE[=shared]
- -
Compile and include the module MODULE. The - identifier MODULE is the Module - Identifier from the module documentation without the - "_module" string. To compile the module as a DSO, add the - option =shared.
- -
--disable-MODULE
- -
Remove the module MODULE which would otherwise - be compiled and included.
- -
--enable-modules=MODULE-LIST
- -
Compile and include the modules listed in the - space-separated MODULE-LIST.
- -
- --enable-mods-shared=MODULE-LIST
- -
Compile and include the modules in the space-separated - MODULE-LIST as dynamically loadable (DSO) - modules.
-
- -

The MODULE-LIST in the - --enable-modules and - --enable-mods-shared options is usually a - space-separated list of module identifiers. For example, to - enable mod_dav and mod_info, you can either use

- -
- ./configure --enable-dav --enable-info -
- -

or, equivalently,

- -
- ./configure --enable-modules="dav info" -
- -

In addition, the special keywords all or - most can be used to add all or most of the modules - in one step. You can then remove any modules that you do not - want with the --disable-MODULE option. - For example, to include all modules as DSOs with the exception - of mod_info, you can use

- -
- ./configure --enable-mods-shared=all - --disable-info -
- -

In addition to the standard set of modules, Apache 2.0 also - includes a choice of Multi-Processing - Modules (MPMs). One, and only one MPM must be included in - the compilation process. The default MPMs for each platform are - listed on the MPM documentation page, - but can be overridden on the configure command - line.

- -
-
--with-mpm=NAME
- -
Choose the mpm NAME.
-
- -

Suexec

- -

Apache includes a support program called suexec which can be used to isolate user - CGI programs. However, if suexec is improperly configured, it - can cause serious security problems. Therefore, you should - carefully read and consider the suexec - documentation before implementing this feature.

- -

Build

- -

Now you can build the various parts which form the Apache - package by simply running the command:

- -
- $ make -
- -

Please be patient here, since a base configuration takes - approximately 3 minutes to compile under a Pentium III/Linux - 2.2 system, but this will vary widely depending on your - hardware and the number of modules which you have enabled.

- -

Install

- -

Now its time to install the package under the configured - installation PREFIX (see --prefix option - above) by running:

- -
- $ make install -
- -

If you are upgrading, the installation will not overwrite - your configuration files or documents.

- -

Customize

- -

Next, you can customize your Apache HTTP server by editing - the configuration files under - PREFIX/conf/.

- -
- $ vi PREFIX/conf/httpd.conf -
- -

Have a look at the Apache manual under docs/manual/ or http://httpd.apache.org/docs/ - for a complete reference of available configuration directives.

- -

Test

- -

Now you can start your Apache - HTTP server by immediately running:

- -
- $ PREFIX/bin/apachectl start -
- -

and then you should be able to request your first document - via URL http://localhost/. The web page you see is located - under the DocumentRoot - which will usually be PREFIX/htdocs/. - Then stop the server again by - running:

- -
- $ PREFIX/bin/apachectl stop -
- - - - diff --git a/docs/manual/install.html.ja.jis b/docs/manual/install.html.ja.jis new file mode 100644 index 0000000000..70ffaeb1ce --- /dev/null +++ b/docs/manual/install.html.ja.jis @@ -0,0 +1,647 @@ + + + + + + Apacheのコンパイルとインストール + + + + + + + +

コンパイルとインストール

+ +

この文書で扱う範囲は、Unix や Unix に類似したシステムでの + Apache のコンパイルとインストールです。 Windows における + コンパイルとインストールに関しては「Microsoft + Windows で Apache を使う」をご覧下さい。 + その他のプラットホームに関しては「プラットホーム」をご覧下さい。

+ +

Apache 2.0 の設定とインストールの環境は、Apache 1.3 とは + 完全に異なるものになりました。簡単にインストールできるように、 + Apache 1.3 では特製スクリプトを使っていました。 + Apache 2.0 では他の Open Source プロジェクトと同様の環境に + するために libtool と autoconf を使うようになっています。

+ + +
+ +

概要 + (せっかちな人向け)

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ダウンロード$ lynx + http://www.apache.org/dist/httpd/httpd-2_0_NN.tar.gz +
展開$ gzip -d httpd-2_0_NN.tar.gz
+ $ tar xvf httpd-2_0_NN.tar
設定$ ./configure --prefix=PREFIX +
コンパイル$ make
インストール$ make install
カスタマイズ$ vi PREFIX/conf/httpd.conf
テスト$ PREFIX/bin/apachectl start +
+ +

NN は最新のマイナーバージョンナンバーに、 + PREFIX はインストールするサーバでのファイルシステムのパスに、 + 置き換えてください。PREFIX を指定しなかった場合は、 + デフォルトの /usr/local/apache2 になります。

+ +

Apache HTTPD のコンパイルとインストールに必要なものをはじめとして、 + 編集とインストールプロセスでのそれぞれの項は + 次に詳しく記述されています。

+ +

必要なもの

+ +

Apache のビルドには次のものが必要です:

+ + + +

ダウンロード

+ +

Apache は Apache Software + Foundation ダウンロードサイト近くの + ミラーサイトからダウンロードできます。

+ +

alpha で終わるバージョン番号は、 + 動くか動かないかよく分からない、 + 早期のプリテストバージョンであることを示しています。 + beta で終わるバージョンはそれよりは信頼性のある + リリースですが、テストとバグフィックスを重ねる段階のものです。 + Apache HTTP サーバの入手可能な中で最高の製品リリースを + ダウンロードしたいのであれば、ファイル名に alpha + も beta + も付かない最新のバージョンを選んでください。

+ +

ダウンロード後、特にミラーサイトを使った場合は、 + ダウンロードしたものが Apache HTTP + サーバの完全で改竄されていないバージョンであることを + 検証することが重要です。これはダウンロードした tarball の PGP 署名を + テストすることによって検証します。 + これは二つの段階があります。 + まず KEYS ファイルを Apache 配布サイト + からダウンロードしてください。(KEYS ファイル自体が + 改竄されていないことを確実にするために、以前の Apache + 配布から取り出したファイルを使ったり、 + 公開鍵サーバから鍵を取り込むのもいいでしょう。) + 自分の個人キーホルダーに鍵を取り込むには、 + 次のコマンド (pgp のバージョンに依存) を使います:

+ +
+ $ pgp < KEYS +
+ または、 + +
+ $ gpg --import KEYS +
+ +

次のステップでは、tarball を PGP 署名でテストします。 + PGP 署名は必ず メインの Apache + ウェブサイトから取得してください。 + 署名ファイルの名前は、ソースファイルの tarball と同じ名前に + .asc を付加したものになっています。 + 以下のコマンド (やっぱり pgp のバージョンに依存) のどれか一つで、 + 配布ファイルをチェックすることができます:

+ +
+ $ pgp httpd-2_0_NN.tar.gz.asc +
+ または、 + +
+ $ gpg --verify httpd-2_0_NN.tar.gz.asc +
+ すると、こんなメッセージを受けるはずです。
+
+ + +
+ Good signature from user "Martin Kraemer + <martin@apache.org>". +
+ +

自分のキーホルダーに格納されている信頼関係が原因で、 + "鍵とその鍵の署名者が検証できなかった" + という旨のメッセージを同時に受けるかもしれません。 + しかし、KEYS + ファイルの信憑性を受け入れるならば問題ではありません。

+ +

展開

+ +

Apache HTTPD の tarball + からソースファイルを展開して取り出すとは、 + 単なる圧縮の解除と tar の展開です:

+ +
+ $ gzip -d httpd-2_0_NN.tar.gz
+ $ tar xvf httpd-2_0_NN.tar
+
+ +

配布用のソースコードがある現在いるディレクトリの下に、 + 新しいディレクトリが作られます。 + サーバをコンパイルする段階に進む前に、そのディレクトリに + cd で移動してください。

+ +

+ ソースツリーを設定する

+ +

次のステップは、あなたのプラットホームと + 個人的な要求に合うように Apache + ソースツリーを設定することです。 + これは配布ディレクトリのルートディレクトリにある、 + configure スクリプトで行ないます。 + (Apache ソースツリーの CVS + 版をダウンロードした開発者は、次のステップに進む前に + autoconflibtool + をインストールして buildconf + を実行する必要があるでしょう。 + 公式リリースではこの作業は必要ありません。)

+ +

デフォルトオプションを使ってソースツリーを全て設定する + のであれば、単純に ./configure とタイプしてください。 + デフォルトオプションを変更できるように、configure + には様々な変数やコマンドラインオプションが用意されています。 + 一般的に、環境変数が ./configure の前に設置されて、 + 他のオプションはその後に設置されます。 + ここで最も重要なオプションは Apache + をどこにインストールするかを決める location prefix です。 + なぜなら、Apache が正しく動作するためには + この場所用に設定されていないといけないからです。 + しかし、お好みにより利用できるオプションはもっと沢山あります。

+ +

ちょっとどんなことができるかを見せましょう。 + ここで典型的な例として、/sw/pkg/apache というインストールツリーで + コンパイラとフラグを指定して、さらに二つの追加モジュール + mod_rewrite と mod_speling を後で DSO メカニズムでロードするように + コンパイルしてみます:

+ +
+ $ CC="pgcc" CFLAGS="-O2" \
+ ./configure --prefix=/sw/pkg/apache \
+ --enable-rewrite=shared \
+ --enable-speling=shared
+
+ +

configure を実行したら、システムの機能を + テストしたり、後でサーバをコンパイルするために必要な Makefile + を生成したりするのに数分間かかるでしょう。

+ +

Apache の全ての設定フラグを見る最も簡単な方法は、 + ./configure --help を実行する方法です。 + 引数や環境変数に関する簡単な記述が出力されます。

+ +

環境変数

+ +

autoconf でのビルドでは幾つかの環境変数を使ってビルド環境を + 設定します。一般的に、これらの変数で Apache をビルドする際の + 方法が変わったりしますが、できあがるサーバの機能には影響ありません。 + これらの変数は configure を呼び出す直前の環境中に + 置くことができますが、通常は上に示した例のように configure + のコマンドラインでもっと簡単に指定できます。

+ +
+
CC=...
+ +
C コンパイラのコマンド名。
+ +
CPPFLAGS=...
+ +
その他の C プリプロセッサやコンパイラのオプション。
+ +
CFLAGS=...
+ +
C コンパイラのデバッグ・最適化オプション。
+ +
LDFLAGS=...
+ +
その他のリンカに渡されるオプション。
+ +
LIBS=...
+ +
リンカに渡すライブラリの位置情報 ("-L"と"-l"オプション) 。 +
+ +
INCLUDES=...
+ +
ヘッダファイルの探索ディレクトリ ("-Idir") 。
+ +
TARGET=... [デフォルト値:apache]
+ +
ビルドする実行ファイルの名前。
+ +
NOTEST_CPPFLAGS=...
+ +
NOTEST_CFLAGS=...
+ +
NOTEST_LDFLAGS=...
+ +
NOTEST_LIBS=...
+ +
これらの変数は"NOTEST でない版"のものと同じ機能を + 持っています。しかし、これらの変数は autoconf + がテストを行った後のビルドプロセスにおいてのみ、適用されます。 + これを使うと、テスト中に問題を起すけれども + 最終的には必要になるフラグを + 含めることができるようになります。
+ +
SHLIB_PATH=...
+ +
コンパイラとリンカに渡す、共有ライブラリへのパスを指定する + オプション。
+
+ +

autoconf 出力オプション

+ +
+
--help
+ +
使用可能な全オプションなど使い方をプリントします。 + 実際に設定はされません。
+ +
--quiet
+ +
"cheking..." といったメッセージがプリントされないように + します。
+ +
--verbose
+ +
検査される全ファイル名を含め、設定プロセス中に + 情報をたくさんプリントします。
+
+ +

パス名

+ +

Apache をインストールするパス名を設定するには、 + 現在二通りの方法があります。まず一つ目は、 + ディレクトリを指定して、その下にデフォルトの配置で + Apache のインストールを行う方法です。

+ +
+
--prefix=PREFIX [デフォルト値: + /usr/local/apache2]
+ +
Apache のファイル群がインストールされるディレクトリを + 指定します。
+
+ +

アーキテクチャに依存したファイルを、 + 異なるディレクトリに配置するようにもできます。

+ +
+
--exec-prefix=EPREFIX + [デフォルト値:PREFIX]
+ +
アーキテクチャ依存のファイルを配置すべき + ディレクトリを指定します。
+
+ +

二つ目の方法は、もっと柔軟にインストールパスの配置を + 設定する方法で、config.layout ファイルを + 使います。この方法を使うことによって、 + Apache のインストール中に、それぞれのファイルのための配置を + 個々に指定できるようになります。config.layout + ファイルには設定例が幾つか含まれていますし、 + お好みの設定を次の例に従って作り出すこともできます。 + このファイル中では、異なる配置は <Layout + FOO>...</Layout> セクションでグループ化され、 + FOO といった名前で参照されます。

+ +
+
--enable-layout=LAYOUT
+ +
インストールパスを指定するため、 + config.layout ファイル中での、 + 指定された名前のレイアウトを使用します。
+
+ +

現在は --enable-layout--prefix + オプションをミックスすることはできません。 + また configure コマンドライン中で、 + 詳しく個々のパス名を指定することもできません。 + 基本的なインストール作業を行いたいだけならば、単純に + --prefix オプションをそのまま使うことができます。 + インストールをカスタマイズしたいのであれば、 + config.layout ファイルを編集して + --enable-layout オプションを使う必要が + あるでしょう。

+ +

モジュール

+ +

Apache はモジュール化されたサーバです。 + ごくごく基本的な機能だけが、コアサーバに含まれています。 + 拡張機能は様々なモジュールの形で提供されます。 + 設定プロセス中では、どんなモジュールをサーバで使うように + コンパイルするか選ばなければなりません。このマニュアルにあるモジュールの一覧を + 参照できます。 + "Base" ステータスの + モジュールはデフォルトで含まれますし、 + 使いたくないのであれば、わざと無効にしなければ + なりません。他のステータスのモジュールは、 + 使いたければ有効にしなければなりません。

+ +

Apache と一緒にコンパイルして使うようにするには、 + 二通りの方法があります。一つめはモジュールを + スタティックコンパイルする方法です。この場合は、 + Apache のバイナリに恒久的に組み込まれることになります。 + これの代わりに、もしオペレーティングシステムが動的共有 + ライブラリ (DSO) (訳注: Dynamic Shared Object) を + 提供していて autoconf がそれを認識できる + 場合は、モジュールをダイナミックコンパイルする方法があります。 + DSO モジュールは Apache のバイナリとは別に + 保存され、mod_so で提供される + 実行時設定ディレクティブを使って + 組み込んだり取り外したりできます。 + 動的モジュールを実際に一つもコンパイルすることなく + サーバが DSO をロードできるようにするには、 + --enable-so と明示的にすることができます。

+ +
+
--enable-MODULE[=shared]
+ +
MODULE モジュールをコンパイルして + インクルードします。識別子 MODULE は + モジュール文書に記載されているモジュール + 識別子から "_module" を取り除いた文字列です。 + DSO としてモジュールをコンパイルする場合は、 + =shared オプションを付加してください。
+ +
--disable-MODULE
+ +
通常はコンパイルされてインクルードされる + MODULE モジュールを除去します。
+ +
--enable-modules=MODULE-LIST
+ +
スペース区切りの MODULE-LIST + に列挙されたモジュールをコンパイルして + インクルードします。
+ +
+ --enable-mods-shared=MODULE-LIST
+ +
スペース区切りの MODULE-LIST を + ダイナミックロード (DSO) できるモジュールとして + コンパイルとインクルードをします。
+
+ +

--enable-modules や + --enable-mods-shared オプションに使う + MODULE-LIST は、普通はスペース区切りの + モジュール識別子のリストです。 + 例えば mod_dav と mod_info を有効にする場合は、 + 次のどちらかが使えます。

+ +
+ ./configure --enable-dav --enable-info +
+ +

または、同等の

+ +
+ ./configure --enable-modules="dav info" +
+ +

これに加えて、特別なキーワード all や + most を使って、 + 一度に全てあるいはほとんどのモジュールを加えることができます。 + その後で好きなモジュールを --disable-MODULE + オプションを使って取り除くことができます。 + 例えば、mod_info を除く全てのモジュールを DSO モジュールとして + 組み込む場合は、次のようにします。

+ +
+ ./configure --enable-mods-shared=all + --disable-info +
+ +

標準的なモジュールに加えて、Apache 2.0 では + Multi-Processing Modules (MPM) + を選択してインクルードします。ただ一つだけの MPM + をコンパイルのプロセスで含める必要があります。 + 個々のプラットホーム向けのデフォルトの MPM は MPM 文書に一覧がありますが、 + configure + コマンドで置き換えることができます。

+ +
+
--with-mpm=NAME
+ +
Choose the mpm NAME.
+
+ +

Suexec

+ +

Apache には suexec と呼ばれる + 補助プログラムがあります。 + このプログラムはユーザの CGI プログラムを隔離するために + 使用することができます。しかしながら、suexec + を適切に設定しなければ、 + セキュリティ上致命的な問題をかかえる場合があります。 + そのため、この機能を実装する前に suexec + 文書をよく読んで一考しておきましょう。

+ +

ビルド

+ +

これで Apache の様々なパーツをビルドすることができます。 + 次のコマンドを単純に実行するだけです:

+ +
+ $ make +
+ +

基本的な設定をするのに、Pentium III/Linux 2.2 + のシステムでおおよそ 3 分程度かかりますが、 + あらかじめご了承下さい。 + また、時間はハードウェアや有効にしたモジュールの数に + 大きく依存するでしょう。

+ +

インストール

+ +

さて、設定したインストール PREFIX + (前述の --prefix オプションを参照) + 以下にパッケージをインストールする段階になりました。 + 次のコマンドを実行してください:

+ +
+ $ make install +
+ +

アップグレードする場合は、インストールでは設定ファイルや + ドキュメントファイルの上書きは行いません。

+ +

カスタマイズ

+ +

次に PREFIX/conf/ 以下にある 設定ファイルを編集して、 + Apache HTTP サーバをカスタマイズします。

+ +
+ $ vi PREFIX/conf/httpd.conf +
+ +

設定ディレクティブの + 完全なリファレンスが載っていますので、 + docs/manual/http://httpd.apache.org/docs/ + にある Apache マニュアルをざっと見てください。

+ +

テスト

+ +

次のコマンドを実行して Apache HTTP サーバを開始できます:

+ +
+ $ PREFIX/bin/apachectl start +
+ +

URL http://localhost/ を通して最初のドキュメントに対する + リクエストを発行する事ができるはずです。これで見える + ウェブページは DocumentRoot + 以下に置かれたもので、通常は + PREFIX/htdocs/ でしょう。 + サーバを再び停止するには、 + 次のコマンドを実行します:

+ +
+ $ PREFIX/bin/apachectl stop +
+ + + +