php5.4.20 php fpm 编译安装

./configure \
--prefix=/usr/local/php5.4.20 \
--with-mysql=mysqlnd \
--with-mysqli=mysqlnd \
--with-pdo-mysql=mysqlnd \
--with-zlib \
--with-bz2 \
--enable-mbstring \
--with-curl \
--enable-fpm \
--enable-zip \
--with-pear \
--with-openssl \
--enable-exif \
--enable-soap \
--with-gd \
--enable-gd-native-ttf \
--with-freetype-dir \
--with-jpeg-dir \
--with-png-dir \
--with-pdo-odbc=unixODBC,/usr/local/unixODBC \
--enable-intl \

--with-icu-dir=/usr/local/src/homebrew/Cellar/icu4c/51.1 \


#### 2选1, 依次编译安装

--with-apxs2=/usr/local/apache2/bin/apxs

--enable-fpm


make & make install


error : icu , intl; 用brew 安装icu4c


mv php.ini-development  PHP_PATH/lib/php.ini

cp php-fpm.conf.default php-fpm.conf

修改user & group

去除/var/run/php-fpm.pid的注解


修改php.ini

date.timezone = Asia/Shanghai


php-fpm相关操作

关闭

sudo kill -INT `cat /usr/loca/php5.4.20/sbin/php-fpm.pid`

重启


sudo kill -USR2 `cat /usr/loca/php5.4.20/sbin/php-fpm.pid`




你可能感兴趣的:(php)