PHP5安裝GD庫的具體操作步驟_PHP教程

來源:互聯網
上載者:User
大家對GD庫應該有所瞭解,它是PHP進行圖文操作時一個重要的庫。那麼今天我們就來具體講解一下如何進行 PHP5安裝GD庫1.下載libpng庫,至少需要支援一種檔案類型,如果需要其他的類型則另外下載

http://nchc.dl.sourceforge.net/project/libpng/00-libpng-stable/1.2.40/libpng-1.2.40.tar.gz

解壓縮後,進入檔案夾

cd libpng-1.2.40

mv scripts/makefile.linux ./Makefile #這裡一定要使用script下的Makefile ,不要通過./configure

產生

make

make install

PHP5安裝GD庫2.下載freetype庫,很多GD函數都需要這個庫的支援

http://ftp.twaren.net/Unix/NonGNU/freetype/freetype-2.3.5.tar.gz

3.解壓後

cd freetype-2.3.5

./configure --prefix=/usr/local/freetype #這裡指定freetype的安裝目錄,以便php編譯時間用到

make

make install

PHP5安裝GD庫4.下載GD庫

從http://www.libgd.org上選擇合適的版本下載

解壓後進入目錄

./configure --prefix=/usr/local/gd2 --with-png --with-freetype #這裡不需要制定freetype目錄,

但是需要制定gd庫的安裝路徑

make

make install

PHP5安裝GD庫5.編譯PHP

進入php源碼目錄

./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --without-sqlite --

without-pdo-sqlite --with-gd=/usr/local/gd2 --with-freetype-dir=/usr/local/freetype/

make

make install

重啟apache即可完成PHP5安裝GD庫。


http://www.bkjia.com/PHPjc/446422.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/446422.htmlTechArticle大家對GD庫應該有所瞭解,它是PHP進行圖文操作時一個重要的庫。那麼今天我們就來具體講解一下如何進行 PHP5安裝GD庫1.下載libpng庫,至少...

  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.