溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點(diǎn)擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

linux php install gd

發(fā)布時(shí)間:2020-07-21 18:00:16 來源:網(wǎng)絡(luò) 閱讀:466 作者:小雄free 欄目:web開發(fā)


下載必要資源


首先下載下列的源碼包

libipeg  –  http://www.ijg.org/files/jpegsrc.v9.tar.gz

libpng  –  http://t.cn/zTgAx90

zlib  –  http://t.cn/zTVy3yu

freetype  –  http://t.cn/zTVyddP

gd  –  http://fossies.org/linux/www/gd-2.0.35.tar.gz

以上均可以wget

#安裝jpeg庫

#cd /usr/local

#mkdir {bin,include,lib,man,man1}

tar zxvf jpegsrc.v9.tar.gz

 

cd jpeg-9

 

./configure --prefix=/usr/local/jpeg

 

make

 

make install

 

#安裝png庫

 

#tar zxvf libpng-1.6.1.tar.gz

 

#cd libpng-1.6.1

 

#./configure --prefix=/usr/local/libpng

 

#make

 

#make install

 

#安裝zlib

 

#tar zxvf zlib-1.2.7.tar.gz

 

#cd zlib-1.2.7

 

#./configure --prefix=/usr/local/zlib

 

#make

 

#make install

 

#安裝FreeType

 

#tar zxvf freetype-2.4.11.tar.gz

 

#./configure --prefix=/usr/local/freetype

 

make

 

make install

 

#安裝GD

 

tar zxvf gd-2.0.35.tar.gz

 

cd gd-2.0.35

 

./configure --prefix=/usr/local/gd --with-zlib=/usr/local/zlib/ --with-png=/usr/local/libpng/ --with-jpeg=/usr/local/jpeg/ --with-freetype=/usr/local/freetype/

 

#重新編譯PHP并安裝

 

#版本大家自定,下面的編譯參數(shù)僅在php-5.3.23上通過...(以apache為列)

 

./configure --prefix=/usr/local/php/ --with-config-file-path=/usr/local/php/etc/ --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-mysql-sock=/tmp/mysql.sock --with-gd=/usr/local/gd/ --with-iconv --with-jpeg-dir=/usr/local/jpeg/ --with-zlib=/usr/local/zlib/ --enable-xml --enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curlwrappers --enable-mbstring=all --enable-ftp --enable-gd-native-ttf --with-openssl --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --with-gettext --enable-session --enable-imap --enable-calendar --enable-eaccelerator=shared --enable-wddx --with-mcrypt=/usr/local/libmcrypt/ --with-freetype-dir=/usr/local/freetype/ --without-pear

make

make install


向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI