#!/bin/bash
##cp -r /usr/local/src/mysql-5.0.41-linux-i686-glibc23 /usr/local/mysql
cp -r /usr/local/src/mysql_x86_64 /usr/local/mysql
sleep 5
cd /usr/local/src
tar xvzf freetype-2.1.9.tar.gz
cd /usr/local/src/freetype-2.1.9
./configure
make && make install
sleep 5
tar xvzf libpng-1.2.8-config.tar.gz
cd /usr/local/src/libpng-1.2.8-config
cp scripts/makefile.linux Makefile
cd /usr/local/src
tar xvzf jpegsrc.v6b.tar.gz
\cp /usr/share/libtool/config.* /usr/local/src/jpeg-6b/
mkdir -p /usr/local/man/man1
cd /usr/local/src/jpeg-6b
./configure --prefix=/usr/local --enable-static --enable-shared
tar xvfj gd-2.0.34.tar.bz2
cd /usr/local/src/gd-2.0.34
./configure --prefix=/usr/local --with-jpeg=/usr/local --with-png=/usr/local
tar xvzf cronolog-1.6.2.tar.gz
cd /usr/local/src/cronolog-1.6.2
sleep 10
tar xvzf libmcrypt-2.5.7.tar.gz
cd /usr/local/src/libmcrypt-2.5.7
tar jxvf mhash-0.9.9.tar.bz2
cd /usr/local/src/mhash-0.9.9
tar zxvf httpd-2.2.21.tar.gz
cd /usr/local/src/httpd-2.2.21
./configure --prefix=/usr/local/apache2 --with-mpm=prefork --enable-deflate --disable-auth --disable-autoindex --disable-status --disable-asis --disable-cgi --disable-actions --disable-userdir --enable-so --enable-headers --enable-rewrite --enable-expires
tar zxvf mod_evasive_1.10.1.tar.tar
cd mod_evasive
/usr/local/apache2/bin/apxs -cia mod_evasive20.c
mkdir -p /var/log/mod_evasive
chown nobody:nobody /var/log/mod_evasive
tar zxvf php-5.2.17.tar.gz
cd php-5.2.17
./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql --with-zlib --with-xml --enable-sockets --with-zlib-dir --with-gd --enable-gd-native-ttf --with-jpeg-dir=/usr/local --with-png-dir=/usr/local --with-ttf --with-freetype-dir=/usr/local --with-iconv --with-curl --with-gettext --enable-trans-id --enable-ftp --enable-mbstring --with-mcrypt --with-mhash --enable-bcmath --enable-soap
\cp /usr/local/src/php-5.2.17/php.ini-dist /usr/local/php/etc/php.ini
ln -s /usr/local/php/etc/php.ini /etc
touch /var/log/php_errorlog.dat
chown nobody:nobody /var/log/php_errorlog.dat
tar jxvf eaccelerator-0.9.5.1.tar.tar
cd eaccelerator-0.9.5.1
/usr/local/php/bin/phpize
./configure --enable-eaccelerator=shared --with-php-config=/usr/local/php/bin/php-config
mkdir -p /tmp/eaccelerator
chmod 777 /tmp/eaccelerator
tar vxzf memcache-2.1.2.tgz
cd memcache-2.1.2
./configure --enable-memcache --with-php-config=/usr/local/php/bin/php-config --with-zlib-dir
sleep 2
tar zxvf mongodb-mongo-php-driver-1.1.4-0-g8684b8a.tar.gz
cd mongodb-mongo-php-driver-4e3a432
./configure --enable-mongo --with-php-config=/usr/local/php/bin/php-config