时间:2021-07-01 10:21:17 帮助过:9人阅读
tar xvzf zlib-1.2.3.tar.gzcd zlib-1.2.3./configure --prefix=/usr/local/zlibmake && make install
tar xvzf freetype-1.3.1.tar.gzcd freetype-1.3.1./configure --prefix=/usr/local/freetypemake && make install
tar xvzf libpng-1.5.2.tar.gzcd libpng-1.5.2./configure --prefix=/usr/local/libpng make && make install
tar xvzf jpegsrc.v6b.tar.gzcd jpegsrc.v6b./configure --prefix=/usr/local/jpeg6 --enable-shared --enable-staticmake && make install
mkdir -p /usr/local/jpeg6/include/mkdir -p /usr/local/jpeg6/lib/mkdir -p /usr/local/jpeg6/bin/cjpegmkdir -p /usr/local/jpeg6/man/man1/
tar xvzf gettext-0.16.1.tar.gzcd gettext-0.16.1./configure --prefix=/usr/local/gettextmake && make install
tar xvzf gd-2.0.35.tar.gzcd gd-2.0.35./configure --prefix=/usr/local/gd --with-jpeg=/usr/local/jpeg6 --with-png=/usr/local/libpng --with-freetype=/usr/local/freetypemake clean(之前编译过就要执行这句)makemake install
cd ../php-5.2.17/ext/gd/ # 下载的安装包所在目录/usr/local/php5/bin/phpize./configure --with-php-config=/usr/local/php/bin/php-config --with-jpeg-dir=/usr/local/jpeg6/ --with-png-dir=/usr/local/libpng/ --with-gd=/usr/local/gd/ --with-freetype=/usr/local/freetype/make clean(之前编译过就要执行这句)make && make install
extension=gd.so
./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --without-sqlite --without-pdo-sqlite --with-gd=/usr/local/gd --with-freetype-dir=/usr/local/freetype/make clean(之前编译过就要执行这句)makemake install
./httpd -k restart