php 5.2.11 with php-5.2.11-fpm编译安装

安装libevent(版本不低于libevent-1.4.12)
wget http://syslab.comsenz.com/downlo ... .4.12-stable.tar.gz
tar zxvf libevent-1.4.12-stable.tar.gz
cd libevent-1.4.12-stable
./configure --prefix=/usr/local/libevent
make && make install


安装php-fpm 0.6
wget http://syslab.comsenz.com/downlo ... m-0.6-5.2.11.tar.gz
tar -zxvf php-fpm-0.6-5.2.11.tar.gz
./php-fpm-0.6-5.2.11/generate-fpm-patch     //生成fpm补丁在/usr/local/src下


下载php-5.2.11.tar.gz
wget http://syslab.comsenz.com/downloads/linux/php-5.2.11.tar.gz
tar xvfz php-5.2.11.tar.gz
cd php-5.2.11
patch -p1 < ../fpm.patch
./buildconf --force
mkdir fpm-build && cd fpm-build
../configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-fpm  --with-fpm-bin=/usr/local/php/bin/php-fpm --with-fpm-conf=/usr/local/php/etc/php-fpm.conf --with-fpm-log=/usr/local/php/var/php-fpm.log --with-fpm-pid=/usr/local/php/var/php-fpm.pid  --with-fpm-user=www --with-fpm-group=www --with-libevent=/usr/local/libevent/ --with-mysql=/usr/local/mysql --with-mysql-sock=/tmp --with-libxml-dir --with-mcrypt --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --with-iconv-dir --with-zlib-dir --enable-soap --enable-gd-native-ttf --enable-ftp --enable-mbstring --enable-exif --enable-zend-multibyte --disable-ipv6 --enable-fastcgi  
make && make install

启动php-fpm
/etc/init.d/php-fpm start

默认端口9000启动,需要套接字启动,需要修改/usr/local/php/etc/php-fpm.conf

添加新评论 »