centos 6.5 + php5.5.31 fastcgi (fpm) 编译安装

yum intsall zlib zlib-devel //gzip 压缩和解压

yum install openssl openssl-devel

yum install libxml2 libxml2-devel
yum install libcurl libcurl-devel
yum install libjpeg libjpeg-devel  //jpeg 图片处理工具
yum install libpng libpng-devel   //png图片处理
yum install freetype freetype-devel //一个字形图glyph image产生工具

//configure: error: utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information.
//imap支持 如果出现 Cannot find imap library (libc-client.a). Please check your c-client installation。 用ln -s /usr/lib64/libc-client.so /usr/lib/libc-client.so解决
yum install libc-client-devel
yum install libmcrypt libmcrypt-devel


//出现 /usr/bin/ld: cannot find -liconv 解决如下
wget http://mirror.hust.edu.cn/gnu/libiconv/libiconv-1.14.tar.gz

tar xvf libiconv-1.14.tar.gz

cd libiconv-1.14
./configure //默认安装位置 /usr/local/lib/ 
make
make install 

 ln -s /usr/local/lib/libiconv.so.2 /usr/lib/libiconv.so.2 ###软连
 ldconfig
 
//PHP安装
 ./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/conf/ --with-mysql --with-mysqli --with-pdo-mysql --with-iconv-dir --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir --enable-bcmath --enable-shmop --enable-sysvsem --with-curl --enable-mbstring --with-mcrypt --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --enable-cli --with-xmlrpc --enable-exif --enable-calendar --with-imap --with-kerberos --with-imap-ssl --enable-fpm  --enable-mysqlnd  --with-gd

make ZEND_EXTRA_LIBS='-liconv' #手工指定将iconv加到php额外库中,一般来说这些库的增加php可以自动完成, 只是iconv貌似不太合群,需要手工操作。
 
sudo make install
 
//copy php配置
cp php.ini-development /usr/local/php/conf/php.ini
 
//copy php-fpm init script
cp sapi/fpm/init.d.php-fpm.in /etc/init.d/php-fpm    ###http://php.net/manual/zh/install.fpm.php
 
//安装memcached
依赖 :  ###1. yum install cyrus-sasl-devel 
    1. libmemcached https://launchpad.net/libmemcached/1.0/1.0.18/+download/libmemcached-1.0.18.tar.gz
 

转载于:https://www.cnblogs.com/sanshuiqing/p/4462407.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值