1.yum install -y zlib libxml libjpeg freetype libpng gd curl libiconv zlib-devel libxml2-devel libjpeg-devel freetype-devel libpng-devel curl-devel
2.yum install -y php-gd*
3.tar zxvf libiconv-1.14.tar.gz
4.cd libiconv-1.14
5../configure --prefix=/usr/local/libiconv
6.make && make install
7. tar zxvf php-5.3.10.tar.gz
8.cd php-5.3.10
9. ./configure --prefix=/application/php5.3.10 --with-mysql=/usr/local/mysql --with-xmlrpc --with-openssl --with-zlib --with-freetype-dir --with-gd --with-jpeg-dir --with-png-dir --with-iconv=/usr/local/libiconv --enable-short-tags --enable-sockets --enable-zend-multibyte --enable-soap --enable-mbstring --enable-static --enable-gd-native-ttf --with-curl --with-xsl --enable-ftp --with-libxml-dir
报错:configure: error: xslt-config not found. Please reinstall the libxslt >= 1.1.0 distribution
解决:yum install libxslt-devel* -y
- make
- make install
- ln -s /application/php5.3.10 /application/php
- ls -l /application/php
- ll php.ini-*
- diff php.ini-development php.ini-production 开发和正式版比较
- /bin/cp php.ini-production /application/php/lib/php.ini