apache compilation
-----------------------------------------------------------------------
#!/bin/bash
version='2.4.12'
pushd /usr/src/
if [ ! -f /usr/src/httpd-${version}.tar.bz2 ]; then
wget http://apache.volia.net/httpd/httpd-${version}.tar.bz2
fi
rm -rf /usr/src/httpd-2.4.12
tar xvf httpd-${version}.tar.bz2
cd /usr/src/httpd-${version}
/usr/bin/make clean
./configure \
--prefix=/usr/local/apache-2.4 \
# --with-apr=/usr/local/apr-1.4.8 \
# --with-apr-util=/usr/src/apr-util-1.5.2
/usr/bin/make -j8
/usr/bin/make install
#/usr/src/compile-mod_umask.sh
#/usr/local/apache-2.4/bin/apxs -a -i -c /usr/src/mod_umask/src/mod_umask.c
popd
---------------------------------------------------------------------------------
php compilation :
---------------------------------------------------------------------------------
#!/bin/bash
version='5.6.9'
_wget='/usr/bin/wget'
_rm='/bin/rm'
_tar='/bin/tar'
_make='/usr/bin/make'
if [ ! -f /usr/src/php-${version}.tar.bz2 ] ; then
${_wget} http://ua2.php.net/distributions/php-${version}.tar.bz2
fi
pushd /usr/src/
${_rm} -rf php-${version}
${_tar} xvf php-${version}.tar.bz2
cd /usr/src/php-${version}
${_make} clean
./configure \
--prefix=/usr/local/php-5.6 \
--with-apxs2=/usr/local/apache-2.4.12/bin/apxs \
--with-config-file-scan-dir=/usr/local/php-5.6/etc/ext-active \
--with-mysql=/usr \
--with-mysqli \
--enable-dba \
--enable-intl \
--with-pdo-mysql=mysqlnd \
--with-bz2 \
--with-gd \
--with-gettext \
--with-zlib \
--enable-zip \
--enable-opcache \
--enable-fpm \
--enable-mbstring \
--with-curl \
--with-mcrypt
${_make} install -s
popd
-------------------------------------------------------
phpredis install script (gentoo, php 7)
--------------------------------
#!/bin/bash
php_ver='7.0'
if [ -d phpredis ]; then
rm -rf phpredis
git clone https://github.com/phpredis/phpredis.git
fi
cd phpredis
git checkout php7
/usr/lib64/php${php_ver}/bin/phpize
aclocal; libtoolize --force; autoheader; autoconf
PATH=/usr/lib64/php${php_ver}/bin/:$PATH ./configure
make
make install
if [ -f /etc/php/apache2-php${php_ver}/ext/redis.so ]; then
bash -c "echo extension=redis.so > /etc/php/apache2-php${php_ver}/ext/redis.ini"
fi
if [ -f /etc/php/apache2-php${php_ver}/ext-active/redis.so ]; then
cd /etc/php/apache2-php${php_ver}/ext-active/ && ln -s ../ext/redis.so
fi
--------------------------------------------------------------