#author("2026-11-06T02:31:46+00:00","default:iseki","iseki")
#author("2026-11-06T02:32:25+00:00","default:iseki","iseki")
** Install of Apache-2.4 [#x4fe4530]
- [[OpenSSL 0.9.x>OpenSSL]] 以上が必要
- OpenSSL1.1.0系は未対応なので注意(20170217現在)
- APR-1.3.0, APR-util-1.3.0 以上が必要
- 参考: http://www.netp.tuis.ac.jp/moodle21/course/view.php?id=7&page=Apache2.4


*** APR [#n4ba7091]
- APR (Apache Portable Runtime): http://apr.apache.org/download.cgi

 # ./configure --prefix=/usr/local/apr
 # make
 # make test
 # make install


*** APR-Util [#o6af4b59]
 # ./configure --with-apr=/usr/local/apr
 # make
 # make test
 # make install


***pcre [#rce43e82]
 # ./configure --prefix=/usr/local/pcre
 # make
 # make install
 # vi /etc/ld.so.conf
    /usr/local/pcre/lib

*** Apache [#j0ccfd74]

 #  ./configure --prefix=/usr/local/apache --enable-ssl --with-ssl=/usr/local/ssl \
    --with-apr=/usr/local/apr  --with-apr-util=/usr/local/apr \
    --enable-suexec --enable-auth-digest --enable-rewrite \
    --enable-dav --enable-so --with-mpm=prefork --enable-module=status
 # make
 # make install

- ''--enable-mods-shared=all'' でコンパイルした方がいい?

- ''--enable-module=status'' で ''server-status'' というURLでステータス情報を表示
-- httpd.conf に以下の設定が必要
-- localhost 以外からチェックする場合は,Require ip 127.0.0.1 を消す.ただし使用に要注意.
 <Location /server-status>
    SetHandler server-status
    Require ip 127.0.0.1
 </Location>

- ''--enable-static-ab'' で abコマンド(ApacheBench)を静的にリンク
 ab -n 1000 -c 100 http://localhost/



**** 現在は MPM に ''event'' を使用したほうが良い  ''--with-mpm=event''
- この場合は PHP も ''--enable-fpm'' 付きでコンパイルする.
- httpd.conf 中の ''LoadModule php_module  modules/libphp.so'' は不要.コメントアウトする


・起動スクリプト
**** 起動スクリプト
 #  vi /usr/lib/systemd/system/apache.service
 [Unit]
 Description=httpd-2.4.25 daemon
 
 [Service]
 Type=forking
 ExecStart=/usr/local/apache/bin/apachectl start
 
 [Install]
 WantedBy=multi-user.target

・起動関連
**** 起動関連
  起動・停止・自動起動
 # systemctl start apache
 # systemctl stop apache
 # systemctl enable apache

トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 ページ一覧 検索 最終更新   ヘルプ   最終更新のRSS