Apache 2.0.49のインストール

Vine Evo

Apache 2.0.49のインストール

ProEvo > Vine Evo > Apache 2.0.49のインストール


1. Apache 2.0.49のインストール

1.1 Aapche 2とは何か?

Apache2はApacheの最新Versionです。1.x系列からソースが大幅に書き直され、機能が強化されました。
Apache 2の新機能については、Apache 2.0の新機能の概要で詳しく説明されています。

1.2 Apache 2を手に入れる

Apache2はApacheサイトのダウンロードページからダウンロードできます。
VineLinuxにインストールするので、httpd-2.0.49.tar.gzをダウンロードしてください。

2. Apache 2のインストール

2.1 旧Versionを削除する

インストールの前に旧VersionのApache(1.3.29)を削除します。
以下のコマンドを実行します。

  1. su
  2. /etc/init.d/httpd stop
  3. cd /usr/local
  4. rm -fr apache
以上で、旧Versionの削除は終了です。

2.2 Aapche 2.0.49をインストールします

Apache 2.0.49をインストールします。 次の手順でコマンドを実行します。

  1. tar zxvf httpd-2.0.49.tar.gz
  2. cd http-2.0.49
  3. ./cf
    ./cf
    ./configure \
     --prefix=/usr/local/apache --mandir=/usr/local/man \
     --enable-v4-mapped --enable-exception-hook --enable-charset-lite \
     --enable-cache --enable-disk-cache --enable-mem-cache \
     --enable-status=shared --enable-headers=shared  --enable-info=shared \
     --enable-mime-magic=shared --enable-expires=shared \
     --enable-usertrack=shared --enable-unique-id=shared \
     --enable-env=shared --enable-setenvif=shared \
     --enable-ssl=shared --enable-dav=shared \
     --enable-cgi=shared --enable-negotiation=shared \
     --enable-speling=shared --enable-userdir=shared \
     --enable-vhost-alias=shared --enable-alias=shared --enable-rewrite=shared \
     --enable-so --with-z
    
  4. make
  5. su
  6. make install
これで、インストールは終了です。
ちなみに、1.xと同じ/usr/local/apache/下にインストールしたので、/etc/init.d/httpdが前と同じように使えます。

2.3 設定ファイルのカスタマイズ

動作するマシンに合わせ設定ファイルをカスタマイズします。
以下に、変更点のみ掲載します。
/usr/local/apache/conf/httpd.conf
.
ExtendedStatus On
.
.
User nobody
Group nobody
.
ServerAdmin root@agartha
.
ServerName agarhta
.
UseCanonicalName On
.
<Directory /home/*/public_html>
  AllowOverride All
  Options MultiViews Indexes SymLinksIfOwnerMatch ExecCGI
</Directory>
.
.
DirectoryIndex index.html index.htm index.html.var index.php index.cgi
.
HostnameLookups On
.
AddHandler cgi-script .cgi
.
.
<Location /server-status>
    SetHandler server-status
    Order deny,allow
    Deny from all
    Allow from localhost agartha tir-n-org
</Location>

<Location /server-info>
    SetHandler server-info
    Order deny,allow
    Deny from all
    Allow from localhost agartha tir-n-org
</Location>
.
以上で設定は終了です。

2.4 自動起動の設定

Linux起動時にApacheが自動的に起動するように設定します。
次の手順で起動・終了スクリプトを設定します。

  1. cd /etc/init.d/
  2. ln -s /usr/local/apache/bin/apachectl httpd
  3. cd /etc/rc.d/rc3.d
  4. ln -s ../init.d/httpd S84httpd
  5. cd ../rc5.d
  6. ln -s ../init.d/httpd S84httpd
以上で設定は終了です。

2.5 Apacheを起動する

上記までの設定が終了すればApacheは起動できます。
以下の手順でApacheを起動します。

  1. /etc/init.d/httpd start
これで、/etc/init.d/httpd start: httpd startedとメッセージが出れば 正常に起動してます。

http://agartha/server-info にアクセスして、Apacheの情報を見ることはできれば Apacheは正常に動いています。


(webmaster@aglabo.com)

$Revision: 2 $
Last update: $Date: 2007-02-28 23:35:40 +0900 (豌エ, 28 2譛 2007) $