yum install gcc make gzip bzip2-devel.x86_64 openssl-devel.x86_64 libxml2-devel.x86_64 libpng-devel.x86_64 libjpeg-devel.x86_64 freetype-devel.x86_64 e2fsprogs-libs.x86_64 freetype.x86_64 krb5-libs openssl.x86_64 libpng.x86_64 libgcc.x86_64 zlib-devel.x86_64 libstdc++.x86_64 libtool-ltdl-devel.x86_64 perl.x86_64 curl-devel.x86_64 autoconf gd-devel.x86_64 wget gcc-c++.x86_64
mkdir soft
cd soft
wget http://nginx.org/download/nginx-0.8.54.tar.gz
wget http://cn.php.net/distributions/php-5.3.5.tar.bz2
wget http://ncu.dl.sourceforge.net/project/eaccelerator/eaccelerator/eAccelerator%200.9.6.1/eaccelerator-0.9.6.1.tar.bz2
wget http://pecl.php.net/get/imagick-3.0.1.tgz
wget http://monkey.org/~provos/libevent-2.0.10-stable.tar.gz
wget ftp://mirror.aarnet.edu.au/pub/p_w_picpathmagick/ImageMagick-6.6.9-6.tar.gz
wget http://ncu.dl.sourceforge.net/project/mcrypt/MCrypt/2.6.8/mcrypt-2.6.8.tar.gz
wget http://memcached.googlecode.com/files/memcached-1.4.5.tar.gz
wget http://ncu.dl.sourceforge.net/project/mcrypt/Libmcrypt/2.5.8/libmcrypt-2.5.8.tar.gz
wget http://pecl.php.net/get/memcache-2.2.6.tgz
wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.13.1.tar.gz
wget http://ncu.dl.sourceforge.net/project/mhash/mhash/0.9.9.9/mhash-0.9.9.9.tar.bz2
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.12.tar.gz
wget http://fallabs.com/tokyocabinet/tokyocabinet-1.4.47.tar.gz
wget http://fallabs.com/tokyotyrant/tokyotyrant-1.1.41.tar.gz
tar zxvf libevent-2.0.10-stable.tar.gz
cd libevent-2.0.10-stable
./configure
make
make install
cd ..
tar zxvf libiconv-1.13.1.tar.gz
cd libiconv-1.13.1
./configure --enable-fast-install --with-libiconv-prefix=/usr/local --enable-shared
make
make install
cd ..
tar zxvf libmcrypt-2.5.8.tar.gz
cd libmcrypt-2.5.8
./configure --enable-dynamic-loading --enable-fast-install --enable-shared
make
make install
#echo "/usr/local/libmcrypt/lib">>/etc/ld.so.conf
#echo "/usr/local/libiconv/lib">>/etc/ld.so.conf
#ldconfig /usr/local/libmcrypt/lib
ldconfig -v | grep mcrypt
cd libltdl/
./configure --enable-ltdl-install
make
make install
make clean
cd ../..
bunzip2 mhash-0.9.9.9.tar.bz2
tar xvf mhash-0.9.9.9.tar
cd mhash-0.9.9.9
./configure --enable-fast-install --enable-static --enable-shared
make
make install
cd ..
#echo "/usr/local/lib">>/etc/ld.so.conf
ldconfig /usr/local/lib
tar zxvf mcrypt-2.6.8.tar.gz
cd mcrypt-2.6.8
./configure --enable-fast-install --enable-static --enable-shared \
--with-libmcrypt-prefix=/usr/local --with-libiconv-prefix \
--with-libintl-prefix=/usr/local/ LD_LIBRARY_PATH=/usr/local/lib
make
make install
cd ..
tar zxvf pcre-8.12.tar.gz
cd pcre-8.12
./configure --enable-pcregrep-libz --enable-pcregrep-libbz2 --enable-utf8
make
make install
cd ..
ldconfig
bunzip2 -k php-5.3.5.tar.bz2
tar xvf php-5.3.5.tar
cd php-5.3.5
./configure \
--prefix=/usr/local/php --with-zlib --disable-rpath \
--enable-safe-mode --enable-sysvsem --with-curl \
--with-curlwrappers --enable-mbregex --enable-fpm \
--enable-mbstring --enable-zip --enable-soap --with-pear \
--disable-phar --disable-tokenizer --disable-ftp \
--with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd \
--with-config-file-path=/usr/local/php/etc --with-openssl \
--with-bz2 --with-curl --with-libxml-dir--with-jpeg-dir \
--with-png-dir--with-zlib-dir--with-freetype-dir \
--with-mhash --with-iconv-dir--enable-gd-native-ttf \
--enable-gd-jis-conv --with-gd --with-mcrypt=/usr/local \
--enable-sockets --with-pcre-dir--enable-zend-multibyte \
--with-zend-vm=GOTO --enable-bcmath --enable-pdo
make ZEND_EXTRA_LIBS='-liconv'
make install
cd ..
tar jxvf eaccelerator-0.9.6.1.tar.bz2
cd eaccelerator-0.9.6.1
/usr/local/php/bin/phpize
./configure --enable-eaccelerator --with-php-config=/usr/local/php/bin/php-config
make
make install
cd ..
tar zxvf ImageMagick-6.6.9-6.tar.gz
cd ImageMagick-6.6.9-6
./configure --with-modules --with-included-ltdl --with-perl --enable-ltdl-install --enable-fast-install --enable-static --enable-shared--enable-hdri --with-autotrace
make
make install
cd ..
tar zxvf imagick-3.0.1.tgz
cd imagick-3.0.1
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config --with-imagick=/usr/local
make
make install
cd ..
tar zxvf memcache-2.2.6.tgz
cd memcache-2.2.6
/usr/local/php/bin/phpize
./configure --enable-memcache --with-php-config=/usr/local/php/bin/php-config --with-zlib-dir
make
make install
cd ..
tar zxvf memcached-1.4.5.tar.gz
cd memcached-1.4.5
./configure --with-libevent=/usr/local
make
make install
cd ..
groupadd -g 102 nginx
useradd -c "Nginx user"-u 100 -g 102 -s/bin/false -d /dev/null nginx
tar zxvf nginx-0.8.54.tar.gz
cd nginx-0.8.54
./configure \
--user=nginx --group=nginx --with-http_stub_status_module \
--with-http_ssl_module --with-http_gzip_static_module --with-http_perl_module \
--with-http_realip_module --with-http_sub_module --with-perl=/usr/bin/perl \
--with-pcre --with-http_secure_link_module \
--http-client-body-temp-path=/var/log/nginx/client_temp \
--http-proxy-temp-path=/var/log/nginx/proxy_temp \
--http-fastcgi-temp-path=/var/log/nginx/fastcgi_temp \
--error-log-path=/var/log/nginx/nginx.log \
--without-http_geo_module --without-http_autoindex_module \
--with-file-aio --with-http_p_w_picpath_filter_module --without-http_browser_module \
--without-mail_pop3_module --without-mail_imap_module \
--without-mail_smtp_module --pid-path=/var/run/nginx.pid
make
make install
cd ..
tar zxvf tokyocabinet-1.4.47.tar.gz
cd tokyocabinet-1.4.47
./configure
make
make install
cd ..
tar zxvf tokyotyrant-1.1.41.tar.gz
cd tokyotyrant-1.1.41
./configure
make
make install
cd ..
/usr/local/bin/ttserver -host {localhostIP}-port 11211 -thnum 8 -dmn -pid /tmp/ttserver.pid -log /var/log/ttserver.log -le -ulog /data/ttserver/-ulim 128m -sid 1 -rts /data/ttserver/ttserver.rts /data/ttserver/database.tch