アットウィキロゴ
青二才なDan
掲示板 掲示板 ページ検索 ページ検索 メニュー メニュー

青二才なDan

Apache 2.2.9 on CentOS 5.2

最終更新:

dyfantasista

- view
だれでも歓迎! 編集

目次



情報

  • ●インストール済みApacheの詳細情報の調べ方
    • httpd -h 簡易ヘルプ
    • httpd -v バージョン情報
    • httpd -V コンパイル条件など詳細な情報
    • httpd -l 静的リンクされたモジュール一覧
    • httpd -M 現在の設定ファイルで読み込まれるモジュール(2.2以降)





情報



事前準備

  • ユーザー、グループ
groupadd apache
useradd -g apache -s /sbin/nologin apache


  • 既存が入っている。
[root@weaver01 bin]# which httpd
/usr/sbin/httpd

[root@weaver01 bin]# httpd -v
Server version: Apache/2.2.3
Server built:   Jan 15 2008 20:33:30
    • 消す
[root@weaver01 bin]# yum remove httpd
Loading "fastestmirror" plugin
Setting up Remove Process
Loading mirror speeds from cached hostfile
 * base: ftp2.riken.jp
 * updates: ftp2.riken.jp
 * addons: ftp2.riken.jp
 * extras: ftp2.riken.jp
Resolving Dependencies
--> Running transaction check
---> Package httpd.i386 0:2.2.3-11.el5_1.centos.3 set to be erased
--> Processing Dependency: httpd for package: system-config-httpd
--> Running transaction check
---> Package system-config-httpd.noarch 5:1.3.3.3-1.el5 set to be erased
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================
 Package                 Arch       Version          Repository        Size
=============================================================================
Removing:
 httpd                   i386       2.2.3-11.el5_1.centos.3  installed         2.8 M
Removing for dependencies:
 system-config-httpd     noarch     5:1.3.3.3-1.el5  installed         2.1 M

Transaction Summary
=============================================================================
Install      0 Package(s)
Update       0 Package(s)
Remove       2 Package(s)

Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Erasing   : httpd                        ######################### [1/2]
  Erasing   : system-config-httpd          ######################### [2/2]

Removed: httpd.i386 0:2.2.3-11.el5_1.centos.3
Dependency Removed: system-config-httpd.noarch 5:1.3.3.3-1.el5
Complete!
  • 本来はこっち。
[root@weaver01 bin]# /vol1/apache2/bin/httpd -v
Server version: Apache/2.2.9 (Unix)
Server built:   Aug 29 2008 16:52:20


インストール

  1. 入手
wget http://www.meisei-u.ac.jp/mirror/apache/httpd/httpd-2.2.9.tar.gz
  1. 解凍
tar xvzf httpd-2.2.9.tar.gz
  1. 移動
cd httpd-2.2.9
  1. コンパイル
./configure \
--prefix=/vol1/apache2 \
--enable-so \
--enable-rewrite \
--enable-cache \
--enable-mem-cache \
--enable-disk-cache \
--enable-expires \
--enable-headers \
--enable-proxy \
--enable-proxy-balancer \
--enable-proxy-http \
--enable-proxy-ajp \
--with-mpm=worker \
--enable-mods-shared=all \



★こんなの出てます。。。警告 & 推奨されないオプションなので、無くなったのか代替えオプションがあるのかも...
--enable-module=shared \

configure: WARNING: Unrecognized options: --enable-module

★代替え
--enable-mods-shared=all \
  1. メーク
make
  1. メークインストール
make install



設定

  • 起動スクリプト
cp /vol1/apache2/bin/apachectl /etc/init.d/httpd

cd /etc/init.d
chmod 700 /etc/init.d/httpd
cd ../rc1.d/
ln -s /etc/init.d/httpd K15httpd
cd ../rc2.d/
ln -s /etc/init.d/httpd K15httpd
cd ../rc3.d/
ln -s /etc/init.d/httpd S85httpd
cd ../rc4.d/
ln -s /etc/init.d/httpd S85httpd
cd ../rc5.d/
ln -s /etc/init.d/httpd S85httpd
cd ../rc6.d/
ln -s /etc/init.d/httpd K15httpd

詳細設定



エラー関係ネタ

# /etc/init.d/apache2 restart
Forcing reload of web server (apache2)...apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName.

   * 「hosts」ファイルの127.0.0.1の最初にWebServerで使用するホスト名を追加する。
   * 127.0.0.1 www.inohara.net localhost netvista 






以上
最近更新されたスレッド
ウィキ募集バナー