分类: LINUX
2011-10-28 17:26:46
rpm -e php-devel-5.3.6-1.w5
rpm -e php-5.3.6-1.w5
rpm -e php-cli-5.3.6-1.w5
rpm -e php-gd-5.3.6-1.w5
rpm -e php-common-5.3.6-1.w5
yum install libxml2 libxml2-devel
下载新的php.5.3.8.tar.gz
解压
./configure --prefix=/usr/local/php --with-mysql=/usr/local/mysql --with-libxml-dir=/usr/local/include/libxml2/libxml --enable-mbstring --with-gd --with-zlib --without-iconv --with-conf-path=/etc/
提示
通过查找libmysqlclient,发现是在/usr/lib64/mysql/目录内的libmysqlclient.so.15.0.0做的软连接,PHP默认是去的 /usr/lib/搜索,所以没有找到.找到问题了就好解决了.
解决办法就是:
cp -rp /usr/lib64/mysql/libmysqlclient.so.15.0.0 /usr/lib/libmysqlclient.so
重新编译
make
make test
make install
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
/usr/sky/soft/php/php-5.3.8/build/shtool install -c ext/phar/phar.phar /usr/local/php/bin
ln -s -f /usr/local/php/bin/phar.phar /usr/local/php/bin/phar
Installing PDO headers: /usr/local/php/include/php/ext/pdo/
cp php.ini-production /usr/local/php/lib/php.ini
vim /etc/php.ini (增加/usr/local/php/lib/php到include_path)
执行/usr/sky/soft/php/php-5.3.8/build/shtool install -c ext/phar/phar.phar /usr/local/php/bin
ln -s -f /usr/local/php/bin/phar.phar /usr/local/php/bin/phar
pecl install mongo
pear config-set php_ini /usr/local/php/lib/php.ini
pecl config-set php_ini /usr/local/php/lib/php.ini
如果用编译方式
phpize
./configure --with-php-config=/usr/local/php/bin/php-config
make &make install