Apache・aprのインストール・設定方法。
対象:Linux Fedora, RedHat
・apr-1.0.0.tar.gz cd /usr/local/src tar xvzf apr-1.0.0.tar.gz ./configure make make instal ・apr-util-1.0.0.tar.gz cd /usr/local/src tar xvzf apr-util-1.0.0.tar.gz ./configure --with-apr=/usr/local/apr make make install
・httpd-2.0.52.tar.gz cd /usr/local/src tar xvzf httpd-2.0.52.tar.gz ./configure --enable-shared=yes --enable-dav=yes make make install または、./configure --enable-mods-shared=most SSLを使う場合 --enable-ssl --with-ssl=/usr/local/ssl mod_rewriteを使う場合 --enable-so --enable-rewrite=shared 任意のaprを指定する場合(未使用) --with-apr=/usr/local/src/apr-1.0.0 --with-apr-util=/usr/local/src/apr-util-1.0.0OpenSSLについては、OpenSSLのインストール・設定を参照。
vi /etc/rc.d/init.d/httpd2
#!/bin/sh
#
# Startup script for the Apache Web Server
# chkconfig: 345 85 15
# description: Apache is a World Wide Web server. It is used to serve \
# HTML files and CGI.
# processname: httpd
# pidfile: /var/run/httpd.pid
# config: /usr/local/apache2/conf/access.conf
# config: /usr/local/apache2/conf/httpd.conf
# config: /usr/local/apache2/conf/srm.conf
# Source function library.
. /etc/rc.d/init.d/functions
case "$1" in
'start')
/usr/local/apache2/bin/apachectl start
;;
'stop')
/usr/local/apache2/bin/apachectl stop
;;
'restart')
/usr/local/apache2/bin/apachectl restart
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit 0
パーミッション変更