让php support jpeg

需要重新编译
‘./configure’  ‘–prefix=/usr/local/php7’ ‘–with-curl=/usr/local/curl’   ‘–with-gettext’ ‘–with-iconv-dir’ ‘–with-mysql-sock’ ‘–with-kerberos’ ‘–with-libdir=lib64’ ‘–with-libxml-dir’ ‘–with-mysqli’ ‘–with-openssl’ ‘–with-pcre-regex’ ‘–with-pdo-mysql’ ‘–with-pdo-sqlite’ ‘–with-pear’  ‘–with-xmlrpc’ ‘–with-xsl’ ‘–enable-fpm’ ‘–enable-bcmath’ ‘–enable-libxml’ ‘–enable-inline-optimization’ ‘–enable-gd-native-ttf’ ‘–enable-mbregex’ ‘–enable-mbstring’ ‘–enable-opcache’ ‘–enable-pcntl’ ‘–enable-shmop’ ‘–enable-soap’ ‘–enable-sockets’ ‘–enable-sysvsem’ ‘–enable-xml’ ‘–with-fpm-user=www’ ‘–with-fpm-group=www’
再下载安装jpeg
wget http://www.ijg.org/files/jpegsrc.v9b.tar.gz tar xzvf jpegsrc.v9b.tar.gz ./configure –prefix=/usr/local/libjpeg –enable-shared –enable-static make && make install
再去php/ext/gd编译安装
cd /usr/local/src/php-5.6.30/ext/gd #gd的源码目录 /usr/local/php/bin/phpize #生成configure命令 ./configure –with-php-config=/usr/local/php/bin/php-config –with-png-dir –with-freetype-dir –with-jpeg-dir=/usr/lib64 -with-zlib-dir –with-gd make && make install#编译gd
重启php-fpm即可

发表评论

电子邮件地址不会被公开。 必填项已用*标注