Created
August 1, 2012 14:56
-
-
Save osyoyu/3227527 to your computer and use it in GitHub Desktop.
Apache 2.4.2 Install Script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [ ! `id -u` -eq 0 ]; then | |
echo "You must run this script as root" | |
exit | |
fi | |
BASE_PATH=`pwd` | |
if [ ! -d "httpd-2.4.2" ]; then | |
wget -O - http://ftp.riken.jp/net/apache//httpd/httpd-2.4.2.tar.gz | tar xzvf - | |
fi | |
if [ ! -d "apr-1.4.6" ]; then | |
wget -O - http://ftp.kddilabs.jp/infosystems/apache//apr/apr-1.4.6.tar.gz | tar xzvf - | |
fi | |
if [ ! -d "apr-util-1.4.1" ]; then | |
wget -O - http://ftp.kddilabs.jp/infosystems/apache//apr/apr-util-1.4.1.tar.gz | tar xzvf - | |
fi | |
cd $BASE_PATH/apr-1.4.6 | |
./configure | |
if [ $? ]; then | |
make | |
make install | |
if [ ! $? ]; then | |
echo "build failed: apr" | |
exit | |
fi | |
else | |
exit | |
fi | |
cd $BASE_PATH/apr-util-1.4.1 | |
./configure --with-apr=/usr/local/apr | |
if [ $? ]; then | |
make | |
make install | |
if [ ! $? ]; then | |
echo "build failed: apr-tools" | |
exit | |
fi | |
else | |
exit | |
fi | |
cd $BASE_PATH/httpd-2.4.2 | |
./configure \ | |
--with-mpm-prefork \ | |
--enable-cgid \ | |
--enable-rewrite \ | |
--enable-ssl=/usr/ssl/lib \ | |
--enable-mods-shared=all \ | |
--enable-suexec \ | |
--sysconfdir=/etc/apache2 | |
if [ $? ]; then | |
make | |
make install | |
if [ ! $? ]; then | |
echo "build failed: apache" | |
exit | |
fi | |
else | |
exit | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment