cd /usr/local/src
wget http://softlayer.dl.sourceforge.net/sourceforge/mcrypt/libmcrypt-2.5.8.tar.gz
tar -zxvf libmcrypt-2.5.8.tar.gz
cd /usr/local/src/libmcrypt-2.5.8
./configure --prefix=/usr/local
make
make install
2)error: Cannot find libmysqlclient under /usr. Note that the MySQL client library is not bundled anymore!
问题是64位系统中 libmysqlclient 默认安装到了 /usr/lib64/mysql/ 目录下
而/usr/lib 目录下没有相应文件,但是php编译时,要去 /usr/lib目录下查找
解决方法:
ln -s /usr/lib64/mysql/libmysqlclient.so.16.0.0 /usr/lib/libmysqlclient.so
3)/usr/bin/ld: cannot find -lltdl
collect2: ld returned 1 exit status
make: *** [libphp5.la] Error 1
深究该问题应该是该库的头文件库没有安装所致
yum list all | grep ltdl
yum -y install libtool-ltdl-devel.x86_64
4)
##根据Wrote PEAR system config file at: /usr/local/php/etc/pear.conf
##You may want to add: /usr/local/php/lib/php to your php.ini include_path
##Installing PDO headers: /usr/local/php/include/php/ext/pdo/
##这个信息,我们需要在当前 php-5.2.17目录下执行
cp php-5.2.17/php.ini-dist /usr/local/php/lib/php.ini
5)
启动 PHP-FPM 时,如遇到下面这个错误信息:
Starting php_fpm Feb 07 10:52:35.508786 [ERROR] fpm_unix_conf_wp(), line 124: please specify user and group other than root, pool 'default'
打开 php-fpm.conf 配置文件,找到下面这个部分:
Unix user of processes
Unix group of processes
去掉注释,并将user和group改为实际实用的用户和组即可。比如user=nginx group=nginx
5 启动服务
/usr/local/php/sbin/php-fpm start
service nginx restart
service mysqld restart
其它的一些细节设置没有一一详写,请大家指教改正!