精華區beta FreeBSD 關於我們 聯絡資訊
FreeBSD Chinese HOWTO -------------------------------------------------------------------------------- Chapter 2. 以 FreeBSD 建立中文 Desktop 的安裝指南 Table of Contents 2.1. 一般使用者的需求 2.2. 針對需求 在建立中文 Desktop 前,請先參考 Installing FreeBSD 安裝好基本的 FreeBSD 環境, 並設定好網路卡。 2.1. 一般使用者的需求 一般使用者的需求是要能夠在 X Window 下使用中文環境, 所以下面就是建立基本中文 環境的做法。 當按照下面的中文環境設定好後,就可以使用 startx 開啟 WindowMaker 美化過後的 X Window,並使用滑鼠右鍵開啟選單,先執行 xcin2.5 後,在執行 rxvt, 這樣子即可在 rxvt 上進行基本的中文顯示與輸入, 這對在 X Window 底下使用 Console 軟體已經十分足夠。 2.1.1. 保持最新的 Ports Tree 在安裝軟體前,最好先更新 Ports Tree, 建議先由安裝光碟中選擇 Ports Collection 先安裝好後, 再來更新 Ports Tree,這樣子更新的時間會比較短。 接著設定好 /etc/make.conf。 SUP_UPDATE= yes SUP= /usr/local/bin/cvsup SUPFLAGS= -g -L 2 # # SUPHOST 代表要到哪台 CVSup,請改成離您比較近的 Server。 SUPHOST= cvsup.tw.FreeBSD.org # # 如果您是用 -stable,請用 stable-supfile (目前的 -stable 是 4.3) # 如果您是用 -current,請用 standard-supfile (目前的 -current 是 5.0) SUPFILE= /usr/share/examples/cvsup/stable-supfile PORTSSUPFILE= /usr/share/examples/cvsup/ports-supfile DOCSUPFILE= /usr/share/examples/cvsup/doc-supfile # 國內主要的 FreeBSD distfiles mirror 站台 MASTER_SITE_BACKUP?= \ ftp://ftp.tw.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/\ ftp://ftp2.tw.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/\ ftp://ftp3.tw.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/\ ftp://ftp4.tw.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/\ ftp://ftp5.tw.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/\ ftp://ftp7.tw.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/\ ftp://ftp8.tw.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/\ ftp://ftp9.tw.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/ MASTER_SITE_OVERRIDE?= ${MASTER_SITE_BACKUP} # 在此我是安裝 XFree86-4 XFREE86_VERSION= 4 安裝好基本的 Ports Tree 後,安裝 cvsup 或是 cvsup-without-gui: # cd /usr/ports/net/cvsup # make -DWITHOUT_X11=yes install clean 接著就可以進行更新了: # cd /usr/ports # make update 2.1.2. 時區設定與對時 調整時區,並對時。 # tzsetup /usr/share/zoneinfo/Asia/Taipei # ntpdate stdtime.gov.tw 2.1.3. X Window 與 Window Manager 安裝 XFree86-4 與 windowmaker。 # cd /usr/ports/x11/XFree86-4 # make install clean # cd /usr/ports/x11-wm/windowmaker # make install clean 設定 XF86Config: # XFree86 -configure # mv XF86Config.new /etc/XF86Config 接著編輯 /etc/XF86Config, 在 Section "Monitor" 區段, 加入 HorizSync 31.5 - 57.0 與 VertRefresh 50.0 - 100.0。 在 Section "Screen" 區段, 加入 DefaultDepth 16,並在 SubSection "Display" 中, Depth 16 的地方加上 Modes "1024x768"。 設定 windowmaker: # wmaker.inst 編輯 ~/.xinitrc 與 ~/.session: exec wmaker 2.1.4. 文鼎TTF與國喬PCF字型 安裝字型: # cd /usr/ports/chinese/arphicttf # make install clean # cd /usr/ports/chinese/kcfonts # make install clean 接著編輯 /etc/XF86Config, 在 Section "Module" 區段, 加入 Load "xtt"。 在 Section "Files" 區段, 加入 FontPath "/usr/X11R6/lib/X11/fonts/TrueType/" 與 FontPath "/usr/X11R6/lib/X11/fonts/local/"。 2.1.5. 中文輸入與終端機 安裝 xcin25 與 rxvt-big5: # cd /usr/ports/chinese/xcin25 # make install clean # cd /usr/ports/chinese/rxvt-big5 # make install clean 接著編輯 ~/.cshrc, 加入 setenv XMODIFIERS "@im=xcin"。 2.1.6. 設定 locale 編輯 ~/.cshrc: setenv LC_CTYPE zh_TW.Big5 setenv LANG zh_TW.Big5 -------------------------------------------------------------------------------- 轉錄自 http://freebsd.sinica.edu.tw/~statue/zh-tut/stepbystep.html