nawawa001 发表于 2015-5-29 12:49:16

centos安装gd库扩展以及ftp扩展,phpcmsv9安装环境

  安装phpcmsv9要求的配置还真不少,好不容易升级了php,还要gd库扩展,支持ftp等待,只想说shit,但是工作还得继续.....
  上一边文章Linux下源码安装php环境,apache2.4.3+mysql5.5+php5.4
  一、下载所需安装包
  gd-2.0.33.tar.gz          http://down1.chinaunix.net/distfiles/gd-2.0.33.tar.gz   
  jpegsrc.v8b.tar.gz       http://www.ijg.org/files/jpegsrc.v8b.tar.gz
  libpng-1.5.0.tar.gz      http://nchc.dl.sourceforge.net/project/libpng/libpng15/1.5.13/lpng1513.7z
  freetype-2.4.4.tar.gz   http://nchc.dl.sourceforge.net/project/freetype/freetype2/2.4.4/freetype-2.4.4.tar.gz
  zlib-1.2.3.tar.gz            ftp://ftp.ru/pub/sunfreeware/SOURCES/zlib-1.2.3.tar.gz
  如果连接失效,请到官网下载
  二、安装zlib
  tar zxvf zlib-1.2.2.tar.gz
#cd zlib-1.2.2
#./configure
#make
#make install

三.安装libpng

#tar zxvf libpng-1.4.2.tar.tar
#cd libpng-1.4.2
#./configure
#make
#make install

四.安装freetype

#tar zxvf freetype-2.3.12.tar.gz
# cd freetype-2.3.12
# ./configure
# make
# make install

五.安装Jpeg


#tar zxvf jpegsrc.v8b.tar.gz
# cd jpeg-8b/
#./configure --enable-shared
# make
# make test
# make install
注意,这里configure一定要带--enable-shared参数,不然,不会生成共享库

六.安装GD

#tar zxvf gd-2.0.33.tar.gz
# cd gd-2.0.33
# ./configure --with-png --with-freetype --with-jpeg
#make
#make install
  
  七、重新安装php
  注意修改一个地方即可。即将#./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql改为
  #./configure --prefix=/usr/local/php--with-config-file-path=/usr/local/etc/cgi --enable-mbstring --enable-ftp --with-gd --with-jpeg-dir=/usr/local/include--with-png-dir=/usr/local/include/libpng14/    --enable-magic-quotes --with-mysql=/usr/local/mysql --with-pear --enable-sockets --with-ttf--with-freetype-dir=/usr/local/include/freetype2/freetype--enable-gd-native-ttf --with-zlib --enable-sysvsem --enable-sysvshm --with-libxml-dir=/usr --enable-force-cgi-redirect --enable-fastcgi --with-xmlrpc --enable-zip --enable-fpm
  
  其余可参考Linux下源码安装php环境,apache2.4.3+mysql5.5+php5.4 中php安装过程。
页: [1]
查看完整版本: centos安装gd库扩展以及ftp扩展,phpcmsv9安装环境