Apache source compilation on Amazon Linux

Install C Compiler

yum install gcc

Installing APR

wget "http://mirrors.gigenet.com/apache//apr/apr-1.5.0.tar.gz"
tar xvzf apr-xx
cd apr-xx
mkdir /usr/local/apr
./configure --prefix=/usr/local/apr
make
make install

Install APR-Util

wget "http://mirrors.gigenet.com/apache//apr/apr-util-1.5.3.tar.gz"
tar xvzf apr-util.xx
cd apr-util.xx
mkdir /usr/local/apr-util
./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
make
make install

Installing C++ Compiler

yum install gcc-c++

Install PCRE

wget "ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.32.tar.gz"
tar xvzf pcre.xx
cd pcre-.xx
mkdir /usr/local/pcre
./configure --prefix=/usr/local/pcre

Installing Apache

#cd /opt/
#tar xvzf apache
#cd httpd
Default Prefix is /usr/local/apache2
#yum install apr apr-util
#./configure  --with-apr-util=/usr/local/apr-util --with-pcre=/usr/local/pcre
make
make install
/usr/local/apache2/bin/httpd -k start

Done.

Pointers

– Apache can be enabled with Worker MPM but mod_php cannot be used along has this would raise compatability issues.(Solution : Use PHP-FPM the fastcgi instead.)

-Apache modules like mod_php , mod_perl are not thread safe.

– Apache module mod_php is best, when used with Prefork MPM module.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s