qwe3223678qwe 发表于 2015-11-15 14:39:01

LAMP中php的配置

LAMP攻略之重新编译PHP安装扩展和GD库安装与配置(3)
   原文:http://os.iyunv.com/art/201103/249952_2.htm

用过LAMP的人们都知道,LAMP是由 Linux+Apache+Mysql+Perl/PHP/Python 一起组成的,
他们每个都在LAMP中起的重要的作用,本文给大家详细介绍下PHP的安装扩展和GD库的知识!
AD:

  好了,GD安装完毕,现在用重新编译php的方法安装gd库扩展。
  上一章说到的lamp环境配置,我的php是解压在 /usr/local/src/php-5.2.9
  可以直接进入这个目录
  cd /usr/local/src/php-5.2.9
  然后重新配置php,配置是想保留原有配置的基础上新增gd库,
  原有的配置可能很多人安装就忘了,没关系,这个可以在phpinfo()的Configure Command 中看到
  ./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/lib
  --with-apxs2=/usr/local/httpd/bin/apxs --with-mysql --with-zlib --enable-mbstring
  --enable-xml --with-gd --with-jpeg-dir=/usr/local/jpeg6 --with-png-dir
  --with-freetype-dir=/usr/local/freetype

  configure成功的话会看到 Thank you for using PHP 的字样
  执行
  make

  执行
  make install

  安装完成后重启apache
  /usr/local/httpd/bin/apachectl -k restart

  打开phpinfo页面应该就可以在Configure Command 及下面看到gd的信息

  至此,PHP扩展GD库安装完成。
  通过文章的详细介绍,我们清楚的知道了重新编译PHP安装扩展和GD库安装与配置,希望对大家有帮助!
             版权声明:本文为博主原创文章,未经博主允许不得转载。
页: [1]
查看完整版本: LAMP中php的配置