-
- [root@jbxue ~]# rpm -qa | grep zlib
- zlib-1.2.1.2-1.2
- zlib-devel-1.2.1.2-1.22.
- You have new mail in /var/spool/mail/root
複製程式碼
不存在的話,請手動下載編譯:http://ishare .iask.sina.com.cn/f/15275772.html
-
- tar zxvf zlib-1.2.2.tar.gz
- cd zlib-1.2.2
- ./configure
- make
- ./configure
make ./configure make ./configure make ./configure make make install
- 複製程式碼
-
-
- 2,安裝libpng http://sourceforge.net/projects/libpng/
-
-
tar zxvf libpng-1.4.2.tar.tar cd libpng-1.4.2./configure cd libpng-1.4.2./configure make > make install
-
- 複製程式碼
-
-
- 3.安裝freetype http://sourceforge.net/projects/freetype/
-
-
-
tar zxvf freetype-2.3.12.tar.gz
cd freetype-2.3.12
./configure make make install
-
- 複製程式碼
-
-
- 4,安裝Jpeg http:/ /www.ijg.org/
-
-
-
-
-
tar zxvf jpegsrc.v8b.tar.gz cd jpeg-8b/
./configure --enable-shared
make make test make install
複製代碼-
-
- 注意,這裡configure一定要帶--enable-shared參數,不然,不會產生共用函式庫。
-
- 5,安裝GD https://bitbucket.org/pierrejoye/gd-libgd/downloads
-
-
tar zxvf gd-2.0.33.tar.gz
cd gd-2.0.33 ./configure --with-png --with-freetype --with-jpeg
make
make install
-
-
- 複製程式碼
-
-
- 6,安裝PHP php-5.2.11.tar.gz
-
-
tar zxvf php-5.2.11.tar.gz
cd php-5.2.11 ./configure選項請見下方
make
make install
-
-
- 複製程式碼
-
-
- 註:
-
-
-
-
-
-
/usr/local/include/freetype2/freetype
- freetype
/usr /local/include/include
- t1lig
/usr/local/include/libpng14/
- png
/usr/local/include
- jpeg
[root@jbxue php-5.2.11]# ./configure --help | grep t1lib
--with-t1lib[=DIR] GD: Include T1lib support . T1lib version >= 5.0.0 required [root@jbxue php-5.2.11]# ./configure --help | grep png --with-png-dir[=DIR] GD: Set the path to libpng install prefix[root@jbxue php-5.2.11]# ./configure --help | grep jpeg --with-jpeg-dir[=DIR] GD: Set the path to libjpeg install prefix[root@jbxue php-5.2.11]# ./configure --help | grep freetype --with-freetype-dir[=DIR] GD: Set the path to FreeType 2 install prefix[root@jbxue php-5.2.11]#
./configure --prefix=/opt/php5 --with-apxs2=/opt/apache/bin/apxs --with -mysql=/usr/local/mysql --with-config-file-path=/opt/php5/lib --with-gd --with-zlib --with-png-dir=/usr/local/include/ libpng14/ --with-jpeg-dir=/usr/local/include --with-freetype-dir=/usr/local/include/freetype2/freetype (--with-t1lib --with-t1lib-dir=/usr /local/include/include)
- 複製程式碼
-
-
- 最後只有T1Lib Support沒有啟用。
-
- GD庫支援最終如下:
-
-
-
-
-
-
Listen 81
- #
- # Dynamic Shared Object (DSO) Support
- #
- # Dynamic Shared Object (DSO) Support
- #
- # be able to use the functionality of a module which was built as a DSO you
- # have to place corresponding `LoadModule' lines at this location so the
# directives contained in it are peru. 🎜># Statically compiled modules (those listed by `httpd -l') do not need # to be loaded here. ## Example: # LoadModuo_# LoadModua. 🎜>LoadModule php5_module modules/libphp5.soAddType application/x-httpd-php .phpAddType application/x-httpd-php-source .phps# p>
複製程式碼在htdocs目錄中建立測試檔案info.php:
-
- [root@jbxue apache]# cat htdocs/info.php
-
echo phpinfo();
- ?
-
複製程式碼
然後,在瀏覽器中存取該文件,可查詢GD庫支援的情況。
|