apacheをBuildインストール〜自動起動設定

例としてapache2.2.22をインストールしています。

    1. ダウンロード
    2. ダウンロードしたソースを解凍
    3. Buildする
      • cd httpd-2.2.22
        ./configure --enable-so
        make
        make install clean
        
      • configureとかmakeでエラーになる場合、以下をインストール
      • yum -y install gcc cc make
    4. 自動起動用のshellを作成
      • vim /etc/init.d/httpd
        #!/bin/sh
        #
        #chkconfig: 35 85 15
        #description: apache 2.2.22
        
        apachectl="/usr/local/apache2/bin/apachectl"
        
        case "$1" in
            start|stop|restart|fullstatus|status|gracefull|gracefull-stop|configtest|startssl)
                $apachectl $@
                ;;      
            *)  
            ;;  
        esac
    5. 自動起動の登録
    6. Apacheの起動

Apacheクックブック 第2版 ―Webサーバ管理者のためのレシピ集

Apacheクックブック 第2版 ―Webサーバ管理者のためのレシピ集