首页 > 技术文章 > 编译安装php5.5和php-fpm

itfenqing 2016-11-11 17:48 原文

需要安装:

gcc
libxml2-devel
bzip2-devel
libcurl
libcurl-devel
libjpeg
libpng
freetype
libjpeg-devel
libpng-devel
freetype-devel
mysql
mysql-devel

*安装libmcrypt和libmcrypt-devel

1、安装第三方yum源
wget http://www.atomicorp.com/installers/atomic
sh ./atomic
2、使用yum命令安装
yum install php-mcrypt libmcrypt libmcrypt-devel

 

 

1.下载指定源码包

2.

./configure --prefix=/usr/local/php53 --enable-fpm --enable-debug --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --enable-mbstring --with-curl --with-libxml-dir --with-mysql --with-mysqli=/usr/bin/mysql_config --enable-sockets --enable-bcmath --enable-xml --with-bz2 --enable-zip --enable-freetype --with-pdo-mysql --with-mcrypt --enable-opcache

3.cp php.ini-production /usr/local/php53/lib/php.ini

4.cp php.ini-development /usr/local/php53/php.ini
5.cp /usr/local/php53/etc/php-fpm.conf.default /usr/local/php53/etc/php-fpm.conf
6.cp sapi/fpm/php-fpm /usr/local/bin

推荐阅读