- 論壇徽章:
- 0
|
GD+PHP
下載
gd-2.0.33.tar.gz
http://www.boutell.com/gd/
jpegsrc.v6b.tar.gz
http://www.ijg.org/
libpng-1.2.7.tar.tar
http://sourceforge.net/projects/libpng/
zlib-1.2.2.tar.gz
http://sourceforge.net/projects/zlib/
freetype-2.1.9.tar.gz
http://sourceforge.net/projects/freetype/
php-4.3.9.tar.gz
http://www.php.net
二、說明
最新的GD庫(kù)包括了對(duì)GIF的支持,所以不要打GIF補(bǔ)丁
http://sourceforge.net/ 好多源代碼包可以在上面找到
安裝步驟:
先安裝zlib,freetype,libpng,jpeg,再裝GD,再裝PHP
三、安裝
1.裝zlib
tar zxvf zlib-1.2.2.tar.gz
cd zlib-1.2.2
./configure
make
make install
2.安裝libpng
tar zxvf libpng-1.2.7.tar.tar
cd libpng-1.2.7
cd scripts/
mv makefile.linux ../makefile
cd ..
make
make install
注意,這里的makefile不是用./configure生成,而是直接從scripts/里拷一個(gè)
3.安裝freetype
tar zxvf freetype-2.1.9.tar.gz
cd freetype-2.1.9
./configure
make
make install
4.安裝Jpeg
tar zxvf jpegsrc.v6b.tar.gz
cd jpeg-6b/
./configure --enable-shared
make
make test
make install
注意,這里configure一定要帶--enable-shared參數(shù),不然,不會(huì)生成共享庫(kù)
5.安裝GD
tar zxvf gd-2.0.33.tar.gz
cd gd-2.0.33
./configure --with-png --with-freetype --with-jpeg
make install
6.安裝PHP
tar zxvf php-5.2.0.tar.gz
cd php-5.2.0
./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --with-gd --with-zlib --with-png --with-jpeg-dir=/usr/local/lib --with-freetype-dir=/usr/local/lib --enable-sockets --with-curl --enable-gd-imgstrttf --enable-gb-native-ttf --with-fft --with-sqlite --with-iconv --with-mbstring
make
make install
cp php-dist.ini /usr/local/php5.2.0/lib/php.ini
7.配置Apache支持PHP(看是否為work模式)
修改httpd-2.2.3/server/mpm/prefork/prefork.c中關(guān)于define DEFAULT_SERVER_LIMIT 256為1024
tar xzvf http-2.2.3.tar.gz
cd http-2.2.3
./configure --prefix=/usr/local/apache2 --enable-rewrite --enable-cgi --enable-http --enable-headers –enable-so
Make
make install
8.測(cè)試
php -r ' phpinfo(); '| more
本文來自ChinaUnix博客,如果查看原文請(qǐng)點(diǎn):http://blog.chinaunix.net/u/29960/showart_571347.html |
|