温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

linux php install gd

发布时间:2020-07-21 18:00:16 阅读:490 作者:小雄free 栏目:web开发
PHP开发者专用服务器限时活动,0元免费领,库存有限,领完即止! 点击查看>>


下载必要资源

首先下载下列的源码包

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并安装

#版本大家自定,下面的编译参数仅在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

亿速云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI

开发者交流群×