Chinaunix首页 | 论坛 | 博客
  • 博客访问: 15260324
  • 博文数量: 7460
  • 博客积分: 10434
  • 博客等级: 上将
  • 技术积分: 78178
  • 用 户 组: 普通用户
  • 注册时间: 2008-03-02 22:54
文章分类

全部博文(7460)

文章存档

2011年(1)

2009年(669)

2008年(6790)

分类: BSD

2008-05-05 08:26:31


  1. addgroup  www  (gid  <  100)
    adduser    www  (uid  <  100)
    lab.mlc.edu.tw是我的網域名稱,是我的主機名稱,您若參考本文件操作時,應將此資料做相對修改為您的網域名稱與主機名稱,才不會出差錯。


  2. 除了imap之外,其餘均可至交通大學之mirror站臺下載。您也可以至尋找。
    cd  /usr/local/src    將檔案下載於此,並在這裡解壓縮與編譯安裝;您的編譯路徑若與本文件相異,請自行修改,照抄時,會出錯。
    tar  zxvf  imap-4.7c2.tar.Z
    tar  zxvf  php-4.0.5.tar.gz
    tar  zxvf  apache_1.3.20.tar.Z


    1. imap之編譯與安裝(此處以安裝於FreeBSD上為例,其他OS系統,請參閱Makefile)
      cd  imap-4.7c
      make  bsf
      cp  imapd/imapd  /usr/local/libexec/
      ln   -s   c-client/   include
      ln   -s   c-client/   lib
    • apache之初始configure
      cd  ../../apache_1.3.20
      ./configure  --prefix=/usr/local/apache
    • php之編譯與安裝(含入imap模組)
      cd  ../php-4.0.5
      ./configure  \
      --prefix=/usr/local/php  \
      --with-apache=../apache_1.3.20  \
      --with-gd=/usr/local/  \
      --with-jpeg-dir=/usr/local  \
      --with-png-dir=/usr/local  \
      --with-imap=../imap-4.7c  \
      --with-mysql=/usr/local/mysql  \
      --enable-trans-sid  \
      --enable-ftp
      gmake
      gmake  install
      cp  php.ini-dist  /usr/local/lib/php.ini
      • --prefix=/usr/local/php
        install architecture-independent files in PREFIX
      • --with-apache=/usr/local/src/apache_1.3.20
        Build Apache module. DIR is the top-level Apache build directory, defaults to /usr/local/etc/httpd.
      • --with-gd=/usr/local
        Include GD support (DIR is GD's install dir). Set DIR to shared to build as a dl, or shared,DIR to build as a dl and still specify DIR.
      • --with-jpeg-dir=/usr/local
        GD: jpeg dir for gd-1.8+
      • --with-png-dir=/usr/local
        png dir for pdflib 3.x
      • --with-imap=/usr/local/include/imap
        Include IMAP support. DIR is the IMAP include and c-client.a directory.
      • --with-mysql=/usr/local/mysql
        Include MySQL support. DIR is the MySQL base directory. If unspecified, the bundled MySQL library will be used.
      • --enable-trans-sid
        Enable transparent session id propagation
      • --enable-ftp
        Enable FTP support
    • apache之編譯與安裝(含入php模組)
      cd  ../apache_1.3.20
      ./configure  \
      --prefix=/usr/local/apache  \
      --enable-module=most  \
      --enable-shared=max  \

      --activate-module=src/modules/php4/libphp4.a
      gmake
      gmake install
      • --prefix=/usr/local/apache
        install architecture-independent files in PREFIX
      • --enable-module=most
        enable a particular Module named 'NAME'
      • --enable-shared=max
        enable build of Module named 'NAME' as a DSO
      • --enable-suexec
        enable the suEXEC feature
      • --suexec-caller=www
        set the suEXEC username of the allowed caller
      • --activate-module=src/modules/php4/libphp4.a
        on-the-fly activate existing 3rd-party Module

      • 更詳細的編譯選項。


    1. 啟動imap功能:
      vi  /etc/inetd.conf
      ......

      kill  -HUP  `cat /var/run/inetd.pid`
    • CGI:
      cd  /usr/local/apache/cgi-bin
      chmod  +x  *
    • httpd.conf:
      vi  conf/httpd.conf
      User  www
      Group  www
      ServerAdmin  admin@lab.mlc.edu.tw
      ServerName  
      DirectoryIndex  index.html  index.htm  index.php  index.php3  index.shtml
      AddType  application/x-httpd-php  .php  .php3
      AddType  application/x-httpd-php-source  .phps
    • 設定開機時就啟動Apache
      vi  /etc/rc.local
      加入一行
      /usr/local/apache/bin/apachectl  start
    • PHP
      cd  /usr/local/apache/htdocs
      vi  phpinfo.php
      建立一行:


    1. /usr/local/apache/bin/apachectl start
    阅读(1046) | 评论(0) | 转发(0) |
    给主人留下些什么吧!~~