Chinaunix首页 | 论坛 | 博客
  • 博客访问: 100889779
  • 博文数量: 19283
  • 博客积分: 9968
  • 博客等级: 上将
  • 技术积分: 196062
  • 用 户 组: 普通用户
  • 注册时间: 2007-02-07 14:28
文章分类

全部博文(19283)

文章存档

2011年(1)

2009年(125)

2008年(19094)

2007年(63)

分类: LINUX

2008-05-23 16:26:10

  来源:


e.安装GD库 
 
  # tar -zvxf gd-2.0.33.tar.gz 
  # mkdir -p /usr/local/gd2 
  # cd gd-2.0.33 
  # ./configure --prefix=/usr/local/gd2 --with-jpeg=/usr/local/jpeg6/ 
  --with-png=/usr/local/lib/ 
  --with-zlib=/usr/local/lib/ 
  --with-freetype=/usr/local/freetype/ 
  # make; make install 
e.安装Curl库 
  # cd /home/xiutuo/software/ 
  # tar -zxf curl-7.15.0.tar.gz 
  # mkdir -p /usr/local/curl 
  # ./configure --prefix=/usr/local/curl 
  # make; make install 

四、安装php5,php5必须有libxml2支持!
a.安装libxml2
 
  # tar -zxf libxml2-2.6.19.tar.gz
  # cd libxml2-2.6.19
  # mkdir -p /usr/local/libxml2
  # ./configure --prefix=/usr/local/libxml2
  # make; make install
b.安装 libxslt(可选安装,你可以不安装)
 
  # tar -zxf libxslt-1.1.15.tar.gz
  # mkdir -p /usr/local/libxslt
  # cd libxslt-1.1.15
  # ./configure --prefix=/usr/local/libxslt --with-libxml-prefix=/usr/local/libxml2
  # make; make install
c.安装php5
 
  # tar -zvxf php-5.2.0.tar.gz
  # mkdir -p /usr/local/php
  # cd php-5.2.0
  # ./configure --prefix=/usr/local/php              (注意使用续行符)
  --with-apxs2=/usr/local/apache2/bin/apxs
  --with-mysql=/usr/local/mysql (RPM方式安装,则一定不能有此项)
  --with-xml
  --with-png 
  --with-jpeg-dir=/usr/local/jpeg6 
  --with-zlib 
  --with-freetype-dir=/usr/local/freetype 
  --with-gd=/usr/local/gd 
  --with-curl 
  --enable-track-vars 
  --disable-debug 
  --enable-url-includes 
  --enable-sockets 
  --enable-force-cgi-redirect 
  --enable-calendar 
  --with-config-file-path=/etc 
  --enable-magic-quotes 
  --enable-ftp 
  --enable-gd-native-ttf 
  --with-ttf 
  --with-gdbm 
  --with-gettext 
  --with-iconv 
  --enable-mbstring=all 
  --enable-memory-limit 
  --with-xsl=/usr/local/libxslt 
  --enable-xslt
  # make
  # make install
  # cp php.ini-dist /usr/local/php/lib/php.ini 
其中./configure 后的
  --prefix=/usr/local/php
  --with-apxs2=/usr/local/apache2/bin/apxs
  --with-mysql=/usr/local/mysql(RPM方式安装,则一定不能有此项,可以使用--with-mysql的方式)
  --with-xml
是必要的选项
  --with-png 
  --with-jpeg-dir=/usr/local/jpeg6 
  --with-gd=/usr/local/gd 
  --with-zlib 
  --with-freetype-dir=/usr/local/freetype 
这是让PHP支持GD库的配置选项
后面都是一些 要使用的PHP 函数库 可以根据自己的喜好删除或增加
五、编辑apache配置文件httpd.conf
  # vi /etc/httpd/httpd.conf
  要改的有如下几处:
  LoadModule php5_module modules/libphp5.so
  前面的#号去掉
  #AddType application/x-gzip .gz .tgz
  下加二行
  AddType application/x-httpd-php .php
  AddType application/x-httpd-php-source .phps
  还有找到DirectoryIndex index.html 
  加上 index.php 让它把index.php做为默认页
 
六、测试PHP
  # vi /var/www/index.php(其中/var/www为网页主目录)
  添加:
       phpinfo();
   ?>
  重新启动apache服务器
  # /usr/local/apache/bin/apachectl restart
  浏览器里测试一下
七、安装ZendOptimizer-3.0.1-linux-glibc21-i386.tar.gz
  # ./install.sh
阅读(433) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~