• <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>
  • FreeBSD WEB服務器架設

    發表于:2007-04-22來源:作者:點擊數: 標簽:服務器web系統FreeBSD架設
    系統安裝、升級、內核定制 FreeBSD 5.2.1 RELEASE Mysql 4.0 Apache 2.0.50 PHP 4.3.8 Pure Ftpd 1.0.20 一、系統安裝 系統安裝選擇standard方式 Minimal 安裝,安裝完后啟動系統 Code: /stand/sysinstall configure-distributions 選擇:src-sys 和 ports
    系統安裝、升級、內核定制

    FreeBSD 5.2.1 RELEASE
    Mysql 4.0
    Apache 2.0.50
    PHP 4.3.8
    Pure Ftpd 1.0.20

    一、系統安裝

    系統安裝選擇standard方式

    Minimal 安裝,安裝完后啟動系統

      Code:  
    /stand/sysinstall

    configure->distributions
    選擇:src->sys 和 ports 兩個,安裝系統內核源碼和ports tree


    這一段對服務器沒用,只是為了方便在家里用ADSL接入互聯網,以便調試服務器
    ================================================
    啟用adsl:
    編輯 ppp.conf 配置文件

      Code:  
    ee /etc/ppp/ppp.conf

    加入以下代碼:

      Code:  
    adsl : #配置代號

    set device PPPoE: em0 # 用你的網卡設備名稱替代xl1
    set authname *** #你的ADSL登陸名稱
    set authkey *** #你的賬號密碼
    set dial
    set login
    set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0
    add default HISADDR# Add a (sticky) default route
    enable dns #從撥號服務器中獲得正確的DNS服務器地址

    注意:每一個設定行前要有一個空格,adsl: 這一個配置代號行前面不能有空格
    手動啟用ADSL:

      Code:  
    ppp -ddial adsl

    如果想在系統啟動時自動啟用adsl:ee /etc/rc.conf
    加入以下代碼:

      Code: [
    ppp_enable="YES"  
    ppp_mode="ddial"
    ppp_profile="adsl"

    ===================================

    二、cvsup 升級源碼

    確定機器已經聯上網了

      Code:  
    cd /usr/ports.net/cvsup-without-gui
    make install clean

    這個過程會很漫長,去看會兒 China Open 吧,吼吼 ........

    好了,cvsup 裝好了,現在來升級源碼
    supfile懶得自己寫,可以拷sample過來用:
    為了以后升級時不用再寫supfile,建個目錄放supfile吧

      Code:   
    mkdir /usr/cvusp
    cp /usr/share/examples/cvsup/stable-fupfile /usr/cvsup
    cp /usr/share/examples/cvsup/standard-fupfile /usr/cvsup
    cp /usr/share/examples/cvsup/ports-fupfile /usr/cvsup

    一般就用這三個,如果你覺得不夠,可以將 /usr/share/examples/cvsup 下面的supfile 全拷過去

    更新 ports tree
    編輯 supfile

      Code:
    ee /usr/cvsup/ports-supfile

    為了加快 cvsup 的速度,用國內的cvsup服務器

      Code:  
    *default host=cvsup3.cn.freebsd.org #把這行改了

    作為一個web服務器,沒必要升級全部的 ports tree,再接著改一下

      Code:  
    #ports-all  #這行前面加上注釋號,不然就會更新全部 ports tree了

    然后,下面的一段已經加上注釋號的,也要改

      Code:  
    ports-base
    #ports-arabic
    ports-archivers
    #ports-astro
    #ports-audio
    #ports-benchmarks
    #ports-biology
    #ports-cad
    #ports-chinese
    ports-comms
    ports-converters
    ports-databases
    ports-deskutils
    ports-devel
    ports-dns
    ports-editors
    ports-emulators
    #ports-finance
    #ports-french
    ports-ftp
    #ports-games
    #ports-german
    #ports-graphics
    #ports-hebrew
    #ports-hungarian
    #ports-irc
    #ports-japanese
    ports-java
    #ports-korean
    ports-lang
    ports-mail
    ports-math
    #ports-mbone
    ports-misc
    #ports-multimedia
    ports-net
    #ports-news
    #ports-palm
    #ports-picobsd
    #ports-polish
    #ports-portuguese
    ports-print
    #ports-russian
    #ports-science
    ports-security
    ports-shells
    ports-sysutils
    ports-textproc
    #ports-ukrainian
    #ports-vietnamese
    ports-www
    #ports-x11
    #ports-x11-clocks
    #ports-x11-fm
    #ports-x11-fonts
    #ports-x11-servers
    #ports-x11-toolkits
    #ports-x11-wm

    改完存盤,然后更新 ports tree

      Code:
    cvsup -g -L 2 /usr/cvsup/ports-supfile

    好,再去看會兒 China Open 吧,赫赫

    更新系統源碼

    編輯 supfile

      Code:
    ee /usr/cvsup/standard-supfile

    有兩個地方要改:

      Code:
    *default host=cvsup3.cn.freebsd.org
    *default release=cvs tag=RELENG_5_2_1_RELEASE

    注意:原文件中的 cvs tag 是一個點,一定要改了它(偶就曾因為忘記改這行,結果更新到了6.*,暴汗~~~~),特別是用current分支的朋友,并且一定要改對,可以去這個網頁查 cvs tag: http://www.freebsd.org/cgi/cvsweb.cgi/src/

    定制內核

    這個沒什么可說的了,N多教程可以看
    有一點要說明,如果你沒有更新過系統源碼,用以下代碼編輯安裝新內核

      Code:  
    /usr/sbin/config 你的內核文件名
    cd ../complie/你的內核文件名
    make depend
    make
    make install

    如果更新過系統源碼:

      Code:   
    cd /usr/src
    make buildkernel KERNCONF= 你的內核文件名
    make installkernel KERNCONF=你的內核文件名
      

    原文轉自:http://www.kjueaiud.com

    老湿亚洲永久精品ww47香蕉图片_日韩欧美中文字幕北美法律_国产AV永久无码天堂影院_久久婷婷综合色丁香五月

  • <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>