Install of Apache-2.4†[edit]
# ./configure --prefix=/usr/local/apr
# make
# make test
# make install
# ./configure --with-apr=/usr/local/apr
# make
# make test
# make install
# ./configure --prefix=/usr/local/pcre
# make
# make install
# vi /etc/ld.so.conf
/usr/local/pcre/lib
# ./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でステータス情報を表示
現在は MPM に event を使用したほうが良い --with-mpm=event[edit]
- この場合は PHP も --enable-fpm 付きでコンパイルする.
- httpd.conf 中の LoadModule php_module modules/libphp.so は不要.コメントアウトする
起動スクリプト[edit]
# 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