centos 6.5 web service模式 系统 安装php
1 首先是坚持libxml2出问题,提示如下:
checking for xml2-config path... /home/www/thirdlib/libxml2/bin/xml2-config
checking whether libxml build works... no
configure: error: build test failed. Please check the config.log for details.
解决如下:
shell > yum -y install libxml2-devel
把安装命令中的 --with-libxml-dir=/home/www/thirdlib/libxml2 改成 --with-libxml-dir=/usr ,因为默认把libxml2-devel安装在了/user里了
2 没安装xpm,重新安装 yum -y install ....
3 报错 configure: error: freetype.h not found.
yum install freetype-devel
下面是安装命令行
./configure --prefix=/home/www/php
--with-config-file-path=/home/www/php/etc
--with-mysql=/home/www/mysql
--with-mysqli=/home/www/mysql/bin/mysql_config
--with-zlib=/home/www/thirdlib/zlib
--with-libxml-dir=/usr --with-pcre-dir=/home/www/thirdlib/pcre
--with-jpeg-dir=/home/www/thirdlib/jpeg
--with-png-dir=/home/www/thirdlib/libpng
--with-freetype-dir=/home/www/thirdlib/freetype
--with-gd=/home/www/thirdlib/gd2
--with-openssl=/home/www/thirdlib/openssl
--with-mcrypt=/home/www/thirdlib/libmcrypt
--with-mhash=/home/www/thirdlib/mhash
--with-xpm-dir=/usr/lib64
--enable-fpm
--enable-mbstring
--enable-xml
--enable-soap
--enable-sockets
--enable-zip
--without-sqlite3
--without-pear
--without-pdo-sqlite
--without-cdb
最终安装成功的命令行:
./configure --prefix=/home/www/php --with-config-file-path=/home/www/php/etc --with-mysql=/home/www/mysql --with-mysqli=/home/www/mysql/bin/mysql_config --with-zlib=/home/www/thirdlib/zlib --with-libxml-dir=/usr --with-pcre-dir=/home/www/thirdlib/pcre --with-jpeg-dir=/home/www/thirdlib/jpeg --with-png-dir=/home/www/thirdlib/libpng --with-freetype-dir=/home/www/thirdlib/freetype --with-gd=/home/www/thirdlib/gd2 --with-openssl=/home/www/thirdlib/openssl --with-mcrypt=/home/www/thirdlib/libmcrypt --with-mhash=/home/www/thirdlib/mhash --with-xpm-dir=/usr/lib64 --enable-fpm --enable-mbstring --enable-xml --enable-soap --enable-sockets --enable-zip --without-sqlite3 --without-pear --without-pdo-sqlite --without-cdb
4 安装扩展库curl提示没有 autoconf, yum install autoconf后解决
5 安装curl扩展
单独一节讨论
6 安装ssh2 库ssh2-0.11.0.tgz
yum install libssh2-devel
./configure --with-php-config=/home/www/php/bin/php-config
phpize。。。