点击(此处)折叠或打开
- ./configure --prefix=/usr/local/php5 --with-config-file-path=/usr/local/php5/etc --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-iconv-dir=/usr/local --with-freetype-dir=/usr/local/freetype2 --with-jpeg-dir=/usr/local/jpeg6/ --with-png-dir=/usr/local/libpng/ --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-discard-path --enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --with-curlwrappers --enable-mbregex --enable-fpm --enable-force-cgi-redirect --enable-mbstring --with-mcrypt --with-gd=/usr/local/gd2 --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --enable-fpm --with-fpm-user=www --with-fpm-group=www --without-pear
jpeg 和 gd都是单独安装的 编译php期间还出现jpeg的共享库文件找不到的情况 要命
几次之后有点郁闷了搜了一下解决方法 有些人是在编译php时没有加入gd jpeg png等相关的选项 而是用extension的方式来支持jpeg 最后php的编译:
点击(此处)折叠或打开
- ./configure --prefix=/usr/local/php5 --with-config-file-path=/usr/local/php5/etc --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-iconv-dir=/usr/local --with-freetype-dir=/usr/local/freetype2 --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-discard-path --enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --with-curlwrappers --enable-mbregex --enable-fpm --enable-force-cgi-redirect --enable-mbstring --with-mcrypt--with-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --enable-fpm --with-fpm-user=www --with-fpm-group=www --without-pear
- make ZEND_EXTRA_LIBS='-liconv' && make && make install
点击(此处)折叠或打开
- phpize
- make clean
- ./configure --with-php-config=/usr/local/php5/bin/php-config --with-jpeg-dir=/usr/local/jpeg6/ --with-freetype-dir=/usr/local/freetype2/ --with-png-dir=/usr/local/libpng/
参考的文章:
http://chen498402552-163-com.iteye.com/blog/1161254