apache2.4.2 インストール

# 2.2 まで同梱されていた apr が同梱されなくなったのでインストール
# http://ftp.jaist.ac.jp/pub/apache//apr/

#########
# apr
#########
$ wget http://ftp.jaist.ac.jp/pub/apache//apr/apr-1.4.6.tar.bz2
$ tar -jxf apr-1.4.6.tar.bz2

$ cd apr-1.4.6
$ ./configure
$ make
$ make install


#########
# apr-util
#########
$ wget http://ftp.jaist.ac.jp/pub/apache//apr/apr-util-1.4.1.tar.bz2
$ tar -jxf apr-util-1.4.1.tar.bz2
$ cd apr-util-1.4.1

# 先にインストールしているaprを指定する
$ ./configure --with-apr=/usr/local/apr
$ make
$ make install


#########
# apache2.4
#########
$ yum install openssl-devel
$ yum install pcre-devel
$ yum install gcc

$ wget http://ftp.tsukuba.wide.ad.jp/software/apache//httpd/httpd-2.4.2.tar.bz2
$ tar -jxf httpd-2.4.2.tar.bz2
$ cd httpd-2.4.2

mkdir /usr/local/apache24

$ ./configure --prefix=/usr/local/apache24 --enable-mods-shared=all --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr --enable-so --enable-ssl=shared
$ make
$ make install

# グループ
/usr/sbin/groupadd apache24

#ユーザー
/usr/sbin/useradd -g apache24 apache24


# config
vi /usr/local/apache24/conf/httpd.conf

#起動
cp /etc/rc.d/init.d/apache22 /etc/rc.d/init.d/apache24

#
vi /etc/rc.d/init.d/apache24


#!/bin/sh
#
# chkconfig: 35 85 15
# description: apache 2.4.2

apachectl="/usr/local/apache24/bin/apachectl"

case "$1" in

start|stop|restart|fullstatus| \
status|graceful|graceful-stop| \
configtest|startssl)

$apachectl $@
;;

*)

;;

esac



chmod 755 /etc/rc.d/init.d/apache24

chkconfig --add apache24
chkconfig --list apache24

allis(オールイズ)

Copyright copyright mark 2008/07 - 2024/03 PureArtTechnology.Ltd All Rights Reserved.UP