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
 
上一篇:(转)怎样查看局域网中自己的IP地址和其他电脑的IP地址?


下一篇:Akka(34): Http:Unmarshalling,from Json