ラベル Apache の投稿を表示しています。 すべての投稿を表示
ラベル Apache の投稿を表示しています。 すべての投稿を表示

2016年5月23日月曜日

Apache http 2.4.20をソースからインストール

このエントリーをはてなブックマークに追加
最近、仕事ではyumでインストールを求められることが多かったので、ソースからインストールを久しぶりにしたのでメモ。
Apache httpdをtar.gz形式でダウンロード。
$ tar -xvzf httpd-2.4.20.tar.gz
できたhttpd-2.4.20の下へ移動してconfihureを実施する。
$ ./configure --enable-so --enable-rewrite --enable-proxy
checking for chosen layout... Apache
checking for working mkdir -p... yes
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
configure:
configure: Configuring Apache Portable Runtime library...
configure:
checking for APR... no
configure: error: APR not found.  Please read the documentation.
そうだ、確か2.4からAPRtAPR-Utilがソースのセットから外出しになっていたんだった。なのでAPRとAPRUtilをソースでダウンロードし解凍してできたディレクトリ毎、httpd2.4.20/srclib配下へ移動させ、上記のconfigureをもう一度やり直す。
$  wget http://ftp.jaist.ac.jp/pub/apache//apr/apr-1.5.2.tar.gz
$  wget http://ftp.kddilabs.jp/infosystems/apache//apr/apr-util-1.5.4.tar.gz
$ tar -xvzf apr-1.5.2.tar.gz
$ tar -xvzf apr-util-1.5.4.tar.gz
$ mv apr-1.5.2 ./httpd-2.4.20/srclib/apr
$ mv apr-util-1.5.4 ./httpd-2.4.20/srclib/apr-util
$ ./configure --enable-so --enable-rewrite --enable-proxy
checking for chosen layout... Apache
::
::
何もなければmake, make installする
$ make
$ make install
httpd.confを一部修正。mod_slotmem_shm.soをIncludeするようにコメントアウトされているものを有効にする。
LoadModule slotmem_shm_module modules/mod_slotmem_shm.so
httpd起動する。
# usr/local/src/httpd-2.4.20# /usr/local/apache2/bin/apachectl start