安装Apache HTTPD
记事本
# 必要モジュールインストール
yum -y install make gcc cpp pcre-devel
mkdir -p /usr/local/src/httpd
cd /usr/local/src/httpd
# version setting
http_version=2.4.7
apr_version=1.5.0
aprutil_version=1.5.3
# ダウンロード (httpd / apr / apr-util)
wget http://ftp.riken.jp/net/apache/httpd/httpd-${http_version}.tar.gz \
http://ftp.riken.jp/net/apache/apr/apr-${apr_version}.tar.gz \
http://ftp.riken.jp/net/apache/apr/apr-util-${aprutil_version}.tar.gz
# 解凍
find -name "*.tar.gz" ! -iregex "\./.+/.+" -exec tar -xzvf {} \;
mv apr-util-*/ httpd-2.4.7/srclib/apr-util/
mv apr-*/ httpd-2.4.7/srclib/apr/
# configure
cd httpd-*
./configure --with-included-apr --enable-load-all-modules
# make
make && make test && make install
# /usr/sbin 設定
cd /usr/sbin
ln -sf /usr/local/apache2/bin/apachectl
ln -sf /usr/local/apache2/bin/httpd
ln -sf /usr/local/apache2/bin/htpasswd
ln -sf /usr/local/apache2/bin/htdigest
ln -sf /usr/local/apache2/bin/apr-1-config
ln -sf /usr/local/apache2/bin/apu-1-config
# /etc/init.d 設定
cd /etc/init.d
ln -sf /usr/local/apache2/bin/apachectl httpd
# default config backup
cd /usr/local/apache2/conf
cp -p httpd.conf httpd.conf.orig