wget
tar -zxvf php-5.3.10.tar.gz
cd php-5.3.10
./configure --prefix=/usr/local/php5310 --with-config-file-path=/usr/local/php5310/etc --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-fpm-user=webadm --with-fpm-group=webadm --with-iconv-dir=/usr/local --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --with-curlwrappers --enable-mbregex --enable-fpm --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-ldap --with-ldap-sasl --with-xmlrpc --enable-zip --enable-soap
make ZEND_EXTRA_LIBS='-liconv'
make install
cp php.ini-production /usr/local/php5310/etc/php.ini
mv /etc/init.d/php-fpm /etc/init.d/php-fpm.bak
cp sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm
cp sapi/fpm/php-fpm.conf /usr/local/php5310/etc/php-fpm.conf
cd ..
sed -i 's#short_open_tag = Off#short_open_tag = On#g' /usr/local/php5310/etc/php.ini
sed -i 's#;pid = run/php-fpm.pid#pid = run/php-fpm.pid#g' /usr/local/php5310/etc/php-fpm.conf
sed -i 's#pm.max_children = 5#pm.max_children = 32#g' /usr/local/php5310/etc/php-fpm.conf
sed -i 's#pm.start_servers = 2#pm.start_servers = 16#g' /usr/local/php5310/etc/php-fpm.conf
sed -i 's#pm.min_spare_servers = 1#pm.min_spare_servers = 8#g' /usr/local/php5310/etc/php-fpm.conf
sed -i 's#pm.max_spare_servers = 3#pm.max_spare_servers = 32#g' /usr/local/php5310/etc/php-fpm.conf
sed -i 's#;pm.max_requests = 500#pm.max_requests = 120#g' /usr/local/php5310/etc/php-fpm.conf
chmod 755 /etc/init.d/php-fpm
chkconfig --add php-fpm
chkconfig --level 345 php-fpm on
/etc/init.d/php-fpm start
阅读(3239) | 评论(0) | 转发(0) |