nginx_fun() {
tar xvf pcre-8.30.tar.bz2
cd pcre-8.30
./configure
make && make install
cd ../
tar xvf nginx-1.2.3.tar.gz
cd nginx-1.2.3
./configure --prefix=${PROGRAMPATH}/nginx-1.2.3 \
--with-pcre=../pcre-8.30
make && make install
cd ../
#cp file
cp nginx.conf ${PROGRAMPATH}/nginx-1.2.3/conf/nginx.conf
cp search.conf ${PROGRAMPATH}/nginx-1.2.3/conf/search.conf
cp php-fpm.conf ${PROGRAMPATH}/php-5.3.17/etc/php-fpm.conf
#mkdir data
mkdir -p /export/data/www
cp search.360buy.com.tar.gz /export/data/www
cd /export/data/www && tar zxvf search.360buy.com.tar.gz
#add user
useradd www
#star nginx php
${PROGRAMPATH}/php-5.3.17/sbin/php-fpm
${PROGRAMPATH}/nginx-1.2.3/sbin/nginx
}
libmcrypt_fun() {
tar xvf libmcrypt-2.5.7.tar.gz
cd libmcrypt-2.5.7
./configure prefix=${PROGRAMPATH}/libmcrypt
make
make install
cd ../
}
# php install
php_fun() {
#php install
tar xvf php-5.3.17.tar.bz2
cd php-5.3.17
./configure --prefix=${PROGRAMPATH}/php-5.3.17 \
--with-config-file-path=${PROGRAMPATH}/php-5.3.17/etc \
--enable-fpm \
--with-fpm-user=www \
--with-fpm-group=www \
--enable-mbstring \
--with-curl \
--with-mcrypt=${PROGRAMPATH}/libmcrypt \
--with-mysql=/usr/local/mysql \
--with-mysqli=mysqlnd \
--with-pdo-mysql=mysqlnd \
--with-iconv
make
make install
cd ../
#eaccelerator
#tar jxvf eaccelerator-0.9.6.1.tar.bz2
#cd eaccelerator-0.9.6.1/
#${PROGRAMPATH}/php-5.3.17/bin/phpize
#./configure --enable-eaccelerator=shared --with-php-config=/export/servers/php-5.3.17/bin/php-config
#make && make install
#cd ../
cp php.ini ${PROGRAMPATH}/php-5.3.17/etc/