- 論壇徽章:
- 0
|
打造中文FreeBSD工作站
eliumao@21cn.com 2003-04-04
版權(quán)所有,違者必究,如何來(lái)究,你告訴我
一. 安裝FreeBSD4.8
安裝時(shí)選擇KDE環(huán)境,需要src
二. 編譯內(nèi)核
只列出相關(guān)內(nèi)容
注釋掉以下各行,為了以后加入中文文件系統(tǒng)支持
#options MSDOSFS #MSDOS Filesystem
#options CD9660 #ISO 9660 Filesystem
#options CD9660_ROOT #CD-ROM usable as root, CD9660 required
添加以下內(nèi)容
#SoundDriver
device pcm
#Java support
options USER_LDT
#To enable IPFW with default deny all packets
options IPFIREWALL
options IPFIREWALL_VERBOSE
options IPFIREWALL_VERBOSE_LIMIT=10
#To hide firewall from traceroute
options IPSTEALTH
#To hide from nmap, remove if create web server
options TCP_DROP_SYNFIN
編譯內(nèi)核
三. 安裝中文環(huán)境
1.中文文件系統(tǒng)
#/usr/ports/chinese/gbfs/make install clean
注意需要有系統(tǒng)源碼.既然裝工作站不妨安裝時(shí)選擇ALL
安裝完成后修改的啟動(dòng)腳本,為了去掉討厭的錯(cuò)誤報(bào)告,不改也可以正常工作
/usr/local/etc/rc.d/gbfs.sh
---------------------------------------------------------------------------------------------
#!/bin/sh
case "$1" in
start)
if [ -x /usr/local/modules/cd9660.ko ]; then
echo -n ' GB-cd9660'
kldload /usr/local/modules/cd9660.ko
fi
if [ -x /usr/local/modules/msdos.ko ]; then
echo -n ' GB-msdos'
kldload /usr/local/modules/msdos.ko
fi
;;
stop)
kldunload -v -n cd9660 && echo -n ' GB-cd9660'
kldunload -v -n msdos && echo -n ' GB-msdos'
;;
*)
echo "Usage: big5fs.sh {start|stop}" >;&2
exit 1
;;
esac
---------------------------------------------------------------------------------------------
重新啟動(dòng).
2. KDE中文化
/usr/ports/chinese/kde3-i18n-zh_CN/make install clean
3.安裝windows simsun字體(根據(jù)zyme的相關(guān)文章設(shè)置,為了方便閱讀,就拷貝到了下面)
#mkdir /usr/X11R6/lib/X11/fonts/TrueType/
#mount_msdos /dev/ad0s1 /mnt
#cp /mnt/winnt/fonts/simsun.ttc /usr/X11R6/lib/X11/fonts/TrueType/
這兒用的是win2000的字體文件,win98的路徑會(huì)不同。
再在/usr/X11R6/lib/X11/fonts/TrueType中建立兩個(gè)文件fonts.dir和fonts.scale。
兩個(gè)文件的內(nèi)容都為:
4
simsun.ttc -misc-SimSun-medium-r-normal--0-0-0-0-p-0-ascii-0
simsun.ttc -misc-SimSun-medium-r-normal--0-0-0-0-p-0-fcd8859-15
simsun.ttc -misc-SimSun-medium-r-normal--0-0-0-0-p-0-gb2312.1980-0
simsun.ttc -misc-SimSun-medium-r-normal--0-0-0-0-p-0-iso8859-1
#mkfontdir -e /usr/X11R6/lib/X11/fonts/encodings -e /usr/X11R6/lib/X11/fonts/encodings/large
修改/etc/X11/XF86Config找到
...............
FontPath "/usr/X11R6/lib/X11/fonts/Speedo/"
FontPath "/usr/X11R6/lib/X11/fonts/75dpi/"
FontPath "/usr/X11R6/lib/X11/fonts/100dpi/"
加入
FontPath "/usr/X11R6/lib/X11/fonts/TrueType/"
找到
# This loads the Type1 and FreeType font modules
Load "type1"
Load "freetype"
加入
Load "xtt"
并在Load "freetype"前加上#使之成為
Load "type1"
# Load "freetype"
Load "xtt"
其實(shí)用Load "freetype"也可以不過很難看。
4.中文X終端
a.konsole的中文環(huán)境
在konsole下執(zhí)行命令
setenv LC_CTYPE en_US.ISO8859-1
但是字體會(huì)比較難看
b.cxterm
/usr/ports/chinese/cxterm/make install clean
注意,這里也需要執(zhí)行下面的命令
setenv LC_CTYPE en_US.ISO8859-1
5.中文輸入法
參照zyme相關(guān)文章改動(dòng)
a. 安裝chinput
/usr/ports/chinese/chinput/make install clean
b. 設(shè)置X
文件~/.xinitrc
export LANG=zh_CN.GBK
export XMODIFIERS=@im=Chinput
exec chinput&
exec startkde
c. local
# cp -r /usr/share/locale/zh_CN.EUC /usr/share/locale/zh_CN.GBK
6.中文文本打印
安裝:/usr/ports/chinese/bg5ps/make install clean
使用: bg5ps -if inputfile -of outputfile
生成的outputfile是ps文件,直接就可以打印
下面是我的HP4100網(wǎng)打的/etc/printcap相關(guān)條目
hp4100|lp|local line printer:\
:lp=::rm=hp4100:sd=/var/spool/lpd/hp4100:lf=/var/log/lpd-errs:
7.中文console
/usr/ports/chinese/zhcon/make install clean
四. 多媒體
1.mplayer
#/usr/ports/multimedia/mplayer/make install clean
#/usr/ports/multimedia/mplayer-skins/make install clean
2.realplayer
#/usr/ports/multimedia/linux-realplayer/make install clean
五. 游戲
我喜歡的幾個(gè)小游戲
#/usr/ports/games/xpacman 大嘴吃豆
#/usr/ports/games/xevil 橫版動(dòng)作
#/usr/ports/games/xdigger 挖金子
這里是我的一點(diǎn)經(jīng)驗(yàn),沒有貼圖,為了有限的資源,沒有IPFW設(shè)置,因?yàn)楦黝}無(wú)關(guān).沒有打印機(jī)的詳悉設(shè)置,寫得太詳細(xì),有違UNIX"自己動(dòng)手"的精神.我想這是基本技巧.只是整理出來(lái),以便初學(xué)者. |
|