源码编译安装php-3.5.8
源码编译安装php-5.3.8(含php-fpm):环境:Centos 6.5
1
2
# ./configure --prefix=/usr/local/php --enable-mbstring --enable-soap --enable-wddx=shared --enable-xml --with-gd --with-gettext --with-regex=system --with-zlib-dir=/usr/local/zlib --enable-fpm --with-jpeg-dir --with-fpm-user=www --with-fpm-group=www --enable-shmop --with-mcrypt --with-mysqli=mysqlnd
# make &&make install
错误1:
64位centos上编译的时候报错:configure: error: mysql configure failed. Please check config.log
解决方法:
找到/usr/lib64/libltdl.so.3.1.4,在该目录下执行以下命令:
1
ln -sv libltdl.so.3.1.4 libltdl.so
最终将出现如下内容,
+--------------------------------------------------------------------+
| License: |
| This software is subject to the PHP License, available in this |
| distribution in the file LICENSE. By continuing this installation |
| process, you are bound by the terms of this license agreement. |
| If you do not agree with the terms of this license, you must abort |
| the installation process at this point. |
+--------------------------------------------------------------------+
Thank you for using PHP.
错误2:
启动错误解决:
ALERT: pm.min_spare_servers(0) must be a positive value
编辑php-fpm.conf找到pm.min_spare_servers 去除;号,注意非注释内容pm.min_spare_servers
ALERT: pm.max_spare_servers(0) must be a positive value
编辑php-fpm.conf找到pm.max_spare_servers 去除;号,同样非注释内容pm.max_spare_servers
WARNING: pm.start_servers is not set. It's been set to 20.
编辑php-fpm.conf找到pm.start_servers 去除;号,同样非注释内容pm.start_servers
ERROR: bind() for address '127.0.0.1:9000' failed: Address already in use (98)
1
2
3
4
5
6
7
8
# ps -ef|grep php|grep -v grep
root 1592 10 12:36 ? 00:00:00 php-fpm: master process (/usr/local/php/etc/php-fpm.conf)
www 1593 15920 12:36 ? 00:00:00 php-fpm: pool www
www 1594 15920 12:36 ? 00:00:00 php-fpm: pool www
···
#
# pkill php-fpm
# /usr/local/php/sbin/php-fpm
这样就执行成功了
页:
[1]