Chinaunix首页 | 论坛 | 博客
  • 博客访问: 468940
  • 博文数量: 132
  • 博客积分: 2995
  • 博客等级: 少校
  • 技术积分: 1412
  • 用 户 组: 普通用户
  • 注册时间: 2007-03-06 20:14
文章分类

全部博文(132)

文章存档

2010年(2)

2008年(21)

2007年(109)

我的朋友

分类:

2007-03-10 13:31:22



一、安装环境
1、硬件环境:
    CPU: P4 2.8(双核)
    memory:512M
2、软件环境:
    OS: FreeBSD 6.0-RELEASE
    compiler: gcc 3.4.4
              perl 5.8.7  
              make 3.81
二、所需软件
    PHP 4.3.8
    zlib-1.2.3
    libpng-1.2.10
    gd-2.0.32
    jpeg6b-freebsd
    make-3.81
    freetype-2.2.1
    openssl-0.9.7i

三安装软件
  1、软件名称:make-3.81.tar.gz
     安装路径:/usr
     安装过程:
     tar xzf make-3.81.tar.gz
     cd make-3.81
     make
     make install

  2、软件名称:
     安装路径:zlib-1.2.3.tar.gz
     安装过程:/usr/local
     tar xzf zlib-1.2.3.tar.gz
     cd zlib-1.2.3
     ./configure
     make
     make install
  
  3、软件名称:openssl-0.9.7i.tar.gz
     安装路径:/usr/softtest/openssl_0.97i
     安装过程:
     tar xzf openssl-0.9.7i.tar.gz
     cd openssl-0.9.7i
     ./config --prefix=/usr/softtest/openssl_0.97i
     make
     make test
     make install   

  4、软件名称:libpng-1.2.10.tar.bz2
     安装路径:/usr/local
     安装过程:
     tar xjf libpng-1.2.10.tar.bz2
     cd libpng-1.2.10
     ./configure
     make
     make check
     make install

  5、软件名称:gd-2.0.32.tar.gz
     安装路径:/usr/local/
     安装过程:
     tar xzf gd-2.0.32.tar.gz
     cd gd-2.0.32
     ./configure
     make
     make install

  6、软件名称:jpeg6b-freebsd.tar.gz
     安装路径:/usr/softtest/jpeg6b
     安装过程:
     tar xvzf jpeg6b-freebsd.tar.gz
     mv jpeg6b-freebsd /usr/softtest/jpeg6b
     注:由于是二进制包,所以不用编译,直接拷贝到指定目录就可以正常使用

  7、软件名称:freetype-2.2.1.tar.bz2
     安装路径:/usr/softtest/freetype-2.2.1
     安装过程:
     tar xjf freetype-2.2.1.tar.bz2
     cd freetype-2.2.1
     ./configure --prefix=/usr/softtest/freetype-2.2.1
     make
     make install    

  8、软件名称:php-4.3.8.tar.tar
     安装路径:/usr/softtest/php-4.3.8
     安装过程:
     tar xzf php-4.3.8.tar.tar
     cd php-4.3.8
     ./configure '--prefix=/usr/softtest/php-4.3.8' '--with-apxs2=/usr/softtest\
     /apache2054/bin/apxs' '--with-mysql=/usr/softtest/mysql4020' '--with-gd' \
     '--enable-dba' '--enable-ftp' '--enable-zend-multibyte' '--enable-debug' \
     '--with-zlib' '--with-openssl=/usr/softtest/openssl_0.97i' '--with-openssl-dir\
     =/usr/softtest/openssl_0.97i' '--with-tsrm-pth' '--enable-versioning' \
     '--enable-mbstring' '--enable-mbstr-enc-trans' '--enable-mbregex' \
     '--with-png-dir=/usr/local/lib' '--with-jpeg-dir=/usr/softtest/jpeg6b' \
     '--with-freetype-dir=/usr/softtest/freetype-2.2.1' '--with-wbmp' \
     '--enable-sockets' '--with-zlib-dir=/usr/local/lib'
     make
     make install
    
     在apache的httpd.conf里加入以下内容:
     AddType application/x-httpd-php .php .phtml .html .htm
     AddType application/x-httpd-php-source .phps

  9、测试
    编辑一个PHP测试文件test.php
    #cd /usr/local/apache2/htdocs
    #vi test.php
   --------------测试内容----------------------
      $test="this is a php test file";
   echo $test. "\n";
   ?>
   ------------------------------------------
   #fetch
   #cat test.php
   -------------result-----------------------
   this is a php test file
   ------------------------------------------
   能看到以上内容说明PHP已经OK!

阅读(977) | 评论(0) | 转发(0) |
0

上一篇:djbdns安装手顺

下一篇:apache配置优化测试

给主人留下些什么吧!~~