大橋のページ

Apacheメモ

Apacheの標準的なインストール
configureスクリプトのヘルプ
ログファイルの分析 wwwstat
ログファイルの分析 Web Statistics
ログファイルの分析 SiteServerExpress 1
ログファイルの分析 SiteServerExpress 2
potatoのインストールと運用
バーチャルホストの設定

Apacheの標準的なインスト−ル

Apacheの標準的なインストール


Apache1.3.3には、configureというシェルスクリプトがあり、インストール前の準備がかなり楽になっています。configureで重要なのは、Apacheのインストール先のディレクトリ配置を指定することと標準モジュールを使う/使わないの設定、追加モジュールの設定です。インストールの際にperlが使われますが、configureがperlを自動的に探して設定するため、とくに指定する必要はありません。

まず、インストール先ディレクトリですが、なにも指定しないまま実行してしまうと、「/usr/local/apache」以下にインストールされます。それでかまわないという人は、あえてディレクトリを指定する必要はありません。configureを実行し、makeし、make installと順に実行していきます。

apache_1.3.3ディレクトリに移動して、次のようにconfigureを実行します。このとき、configureにはパスが通っていないため、「./configure」として実行する必要があります。このとき一般のユーザアカウントでconfigureを実行するとApacheが使うポートが「8080」として設定されます。suコマンドでスーパーユーザとしてconfigureを実行するとポートは一般的な「80」として設定されます。


$ ./configure
Configuring for Apache, Version 1.3.3
 + Warning: Configuring Apache with default settings.
 + This is probably not what you really want.
 + Please read the README.configure and INSTALL files
 + first or at least run './configure --help' for
 + a compact summary of available options.
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
 + doing sanity check on compiler and options
Creating Makefile in src/support
Creating Makefile in src/main
Creating Makefile in src/ap
Creating Makefile in src/regex
Creating Makefile in src/os/unix
Creating Makefile in src/modules/standard


続いて、makeを実行します。


$ make
===> src
make[1]: Entering directory `/home/oohashi/apache_1.3.3'
make[2]: Entering directory `/home/oohashi/apache_1.3.3/src'
===> src/regex
(略)


make installを実行します。このときは、suコマンドでスーパーユーザにならないと実行できません。


# make install
===> [mktree: Creating Apache installation tree]
./src/helpers/mkdir.sh /usr/local/apache/bin
./src/helpers/mkdir.sh /usr/local/apache/sbin
./src/helpers/mkdir.sh /usr/local/apache/libexec
./src/helpers/mkdir.sh /usr/local/apache/man/man1
./src/helpers/mkdir.sh /usr/local/apache/man/man8
./src/helpers/mkdir.sh /usr/local/apache/etc
./src/helpers/mkdir.sh /usr/local/apache/share/htdocs
./src/helpers/mkdir.sh /usr/local/apache/share/icons
./src/helpers/mkdir.sh /usr/local/apache/share/cgi-bin
./src/helpers/mkdir.sh /usr/local/apache/include
./src/helpers/mkdir.sh /usr/local/apache/var/run
./src/helpers/mkdir.sh /usr/local/apache/var/log
./src/helpers/mkdir.sh /usr/local/apache/var/proxy

(略)

make[1]: Leaving directory `/home/oohashi/apache_1.3.3'
+--------------------------------------------------------+
| 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/apache/etc/{httpd,access,srm}.conf
|                                                        |
| and then you should be able to immediately fire up     |
| Apache the first time by running:                      |
|                                                        |
|   /usr/local/apache/sbin/apachectl start
|                                                        |
| Thanks for using Apache.       The Apache Group        |
|                                http://www.apache.org/  |
+--------------------------------------------------------+


 以上でインストールは終了です。最後に表示されたメッセージは、環境設定ファイル(httpd.conf、access.conf、srm.conf)のあるディレクトリと、Apacheを起動するシェルスクリプトapachectlを使って起動する方法を説明しています。

著作権、商標等について (C) 1999 HyperDyne Inc.