歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux綜合 >> Linux資訊 >> 更多Linux >> Debian Woody 3.0r1安裝漢化指南

Debian Woody 3.0r1安裝漢化指南

日期:2017/2/27 9:22:14   编辑:更多Linux
  代碼: 本文不對Linux各種發行版孰能孰不能做出評論。 本文基於http://www.linuxsir.com Debian版的某些文章,再加上本人幾次安裝過程中總結的一點經驗綜合整理而成, 感謝文章原作者的工作, 這裡就不一一列出 1.安裝基本系統,大約70M,之後先不必使用tasksel和dselect安裝其它軟件; 2.更新apt sourcelist: 將如下幾行加到/etc/apt/source.list中: 代碼: deb http://FTP.jp.debian.org/debian/ unstable main non-free contrib #日本的apt server,更新較快,速度可以 deb http://marillat.free.fr/ unstable main #mplayer在此服務器上 然後執行apt-get update來更新apt-cache. 3.更新內核版本: #apt-get install kernel-image 列出以下版本的內核: 代碼: Reading Package Lists... Done Building Dependency Tree... Done Package kernel-image is a virtual package provided by: kernel-image-2.4.20-k7-smp 2.4.20-5 kernel-image-2.4.20-k7 2.4.20-5 kernel-image-2.4.20-k6 2.4.20-5 kernel-image-2.4.20-686-smp 2.4.20-5 kernel-image-2.4.20-686 2.4.20-5 kernel-image-2.4.20-586tsc 2.4.20-5 kernel-image-2.4.20-386 2.4.20-5 kernel-image-2.4.18-bf2.4 2.4.18-6 kernel-image-2.2.22-idepci 2.2.22-1 kernel-image-2.2.22-compact 2.2.22-1 kernel-image-2.2.22 2.2.22-1 kernel-image-2.2.20-udma100-ext3 2.2.20-7 kernel-image-2.2.20-reiserfs 2.2.20-4 You should eXPlicitly select one to install. E: Package kernel-image has no installation candidate 我們的目的是升級到2.4.20版本,選擇適合你的CPU的內核. 例如我的CPU是INTEL的P4-1.8G,所以選686的: 代碼: # apt-get install kernel-image-2.4.20-686 取回新的內核映像後,接下來的第一個提示是: 代碼: Do you want to stop now? [Y/n] 這裡應該打n,除非你想中途退出. 接下來,安裝過程會提示是否使用現有的LILO配置: 代碼: You already have a LILO configuration in /etc/lilo.conf Install a boot block using the existing /etc/lilo.conf? [Yes] 直接回車,或打Yes就完成了kernel的安裝. 由於安裝過程不會自動修改你的lilo.conf,所以接下來要手動修改一下: 首先為你的新內核的initrd做一個符號鏈接: 代碼: #ln -s /boot/initrd-xxx(xxx根據你的內核版本而定) /boot/initrd 做symbol link的好處就是你今後再升級內核的時候,不必再改lilo配置文件,只需重建這個符號鏈接就行了. 其次,修改你的lilo.conf 代碼: #vi /etc/lilo.conf 找到image=/vmlinuz,在它下邊增加一行:initrd=/boot/initrd 最後重新引導記錄: 代碼: #lilo -v -v -v 代碼: #reboot 重啟之後,有時會遇到網卡不能正確被識別的問題,一般需要在/etc/modules.conf中增加網卡的module,


例如我的網卡是3COM的,就加上 alias eth0 3c59x 即可; 如果用vmware安裝的,就加上 alias eth0 pcnet32; 如果是tp-link,D-link,intel-2114x之類普通的牌號,一般加上 alias eth0 tulip 就可. 當然你也可以用modconf來選擇添加. 添加之後重新啟動. 4.用apt-get安裝新版本的XFree86(XFree86-4.2.1-16) 代碼: #apt-get install x-window-system-core 取回X-server及相關軟件包之後,會提示你做一些簡單的X的配置; 接下來會有兩個提示: 代碼: Do you want to upgrade glibc? [Y/n] Do you want to restart services? [Y/n] 直接打Y或回車確定. 接下運行tasksel,選擇X Window system,用來安裝X的其它組件. X的安裝完成. 5.安裝一個窗口管理器,這裡介紹wmaker 代碼: #apt-get install wmaker wmaker-data wmakerconf wmakerconf-data 到這裡,我們已經基本安裝完成,接下來進行漢化的工作. 6.用defoma安裝中文字體 6-a.安裝defoma (Debian Font Manager): 代碼: #apt-get install defoma 6-b.安裝x-ttcidfont-conf (Configure TrueType and CID fonts for X): 代碼: #apt-get istall x-ttcidfont-conf 6-c.安裝文鼎的四個字體文件: 代碼: #apt-get install ttf-arphic-* 6-d.安裝xfs-xtt (X TrueType-Font Server): 代碼: #apt-get install xfs-xtt 6-e.在/etc/X11/XF86config-4文件中添加如下字體路徑: 代碼: FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType" FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/CID" 6-f.安裝simsun.ttf字體 先取回simsun字體,放到以下目錄: 代碼: #mkdir /usr/share/fonts/truetype/sim #cp simsun.ttf /usr/share/fonts/truetype/sim/ 6-g.為simsun.ttf字體編寫hints文件(或用defoma-hints truetype simsun.ttf > simsun.hints來生成) 代碼: #cd /etc/defoma/hints #vi ttf-sim-simsun.hints 內容如下: 代碼: category truetype begin /usr/share/fonts/truetype/sim/simsun.ttf Family = Sim-Sun FontName = SimSun-Medium Encoding = Unicode Location = Chinese-China English Charset = ISO10646-1 GB2312 BIG5 ISO8859-1 UniCharset = GB2312 BIG5 ISO8859-1 GeneralFamily = SimSun Weight = Medium Width = Fixed Shape = Upright Alias = Sim-SunGB SimSunGB Foundry = Sim Priority = 20 X-Family = SimSun X-ElementAlias=foundry=default:family=simsun:resx=72:resy=72 TTCap = halfwidth-bw=0.5 italic-angle=0.167 no-roblique no-oblique no-ritalic end 注意:begin與end的前邊不要有空格. 6-h.將寫好的hints文件注冊到defoma: 代碼: #defoma-font reregister-all ttf-sim-simsun.hints 6-i.修改/etc/X11/XF86Config-4文件,用xtt代替freetype. 講到這裡,有一個問題需要注意,就是XF86-4.2.1-16有一個bug,就是加載libxtt.a時會出錯, 因此需要從http://femc.vicp.net/~dgh/src/libxtt.a這裡下載一個新的 libxtt.a文件,覆蓋掉/usr/X11R6/lib/modules/fonts/libxtt.a即可. 7.設置系統locale 安裝國際語言數據locales:

代碼: #apt-get install locales 取回軟件包後,在配置界面中選擇zh_CN GB2312, 默認的locales選擇zh_CN. 8.設置字體及輸入法 8-a.修改gtkrc.zh_CN更換字體: 內容如下: 代碼: style "gtk-default-zh-cn" { fontset = "-adobe-helvelica-medium-r-normal--14-*-*-*-*-*-iso8859-1,\ -sim-simsun-medium-r-normal--14-*-*-*-*-*-gb2312.1980-0,fixed" } class "GtkWidget" style "gtk-default-zh-cn" 8-b.修改wmaker配置文件更換字體: 代碼: #vi ~/GNUstep/Defaults/WindowMaker 將每個字體的後邊加上simsun的字體,例如: 代碼: "-原-來-的-字-體-,-sim-simsun-medium-r-normal--14-*-*-*-*-*-gb2312.1980-0"; 8-c.編輯~/GNUstep/Defaults/WMGLOBAL文件(無此文件就新創建一個): 內容如下: 代碼: { MultiByteText = YES; } 8-d.安裝fcitx: 代碼: #apt-get install fcitx 裝完後,將以下三行加到~/.bashrc中: 代碼: export XMODIFIERS="@im=fcitx" export XIM=fcitx export XIM_PROGRAM=fcitx 8-e.安裝rxvt rxvt-ml: #apt-get install rxvt rxvt-ml rxvt-ml中含有支持簡體中文的crxvt-gb和繁體中文的crxvt-big5兩個版本 修改~/.Xresources文件,添加如下內容: 代碼: !! RXVT setting Rxvt.background:black Rxvt.foreground:white Rxvt.colorBD:yellow Rxvt.colorUL:green Rxvt.multichar_encoding:gb2312 Rxvt.scrollBar:True Rxvt.scrollBar_right:True Rxvt.scrollBar_floating: False Rxvt.scrollstyle: next Rxvt.saveLines:1500 Rxvt.color0:black Rxvt.color1:red Rxvt.color2:#3a5da3 Rxvt.color3:#4b76cc Rxvt.color4:RoyalBlue4 Rxvt.color4:#123f75 Rxvt.color5:magenta Rxvt.color6:#a1b5dd Rxvt.color7:#8a95aa Rxvt.color8:#616668 Rxvt.color9:#075982 Rxvt.color10:#0f82bc Rxvt.color11:#13a9f4 Rxvt.color12:SkyBlue2 Rxvt.color12:#3d99c6 Rxvt.color13:#63c2f2 Rxvt.color14:#6caccc Rxvt.color15:#dbeff9 Rxvt.font:7x14 Rxvt.font:-b&h-lUCidatypewriter-medium-r-normal-*-12-*-*-*-*-*-iso8859-* Rxvt.mfont:-*-simsun-medium-r-normal-*-14-*-*-*-c-*-gb*-* Rxvt.menu:/etc/X11/rxvt.menu Rxvt.preeditType:Root 以上配置用於更改rxvt的風格及中文字體. 9.reboot 到此,我們的漢化工作基本告成, 此時系統一般會占用400M左右的空間. 接下來就用apt-get去安裝你想要的軟件吧. Enjoy it!



Rxvt.color0:black Rxvt.color1:red Rxvt.color2:#3a5da3 Rxvt.color3:#4b76cc Rxvt.color4:RoyalBlue4 Rxvt.color4:#123f75 Rxvt.color5:magenta Rxvt.color6:#a1b5dd Rxvt.color7:#8a95aa Rxvt.color8:#616668 Rxvt.color9:#075982 Rxvt.color10:#0f82bc Rxvt.color11:#13a9f4 Rxvt.color12:SkyBlue2 Rxvt.color12:#3d99c6 Rxvt.color13:#63c2f2 Rxvt.color14:#6caccc Rxvt.color15:#dbeff9 Rxvt.font:7x14 Rxvt.font:-b&h-lUCidatypewriter-medium-r-normal-*-12-*-*-*-*-*-iso8859-* Rxvt.mfont:-*-simsun-medium-r-normal-*-14-*-*-*-c-*-gb*-* Rxvt.menu:/etc/X11/rxvt.menu Rxvt.preeditType:Root 以上配置用於更改rxvt的風格及中文字體. 9.reboot 到此,我們的漢化工作基本告成, 此時系統一般會占用400M左右的空間. 接下來就用apt-get去安裝你想要的軟件吧. Enjoy it!



Rxvt.font:7x14 Rxvt.font:-b&h-lUCidatypewriter-medium-r-normal-*-12-*-*-*-*-*-iso8859-* Rxvt.mfont:-*-simsun-medium-r-normal-*-14-*-*-*-c-*-gb*-* Rxvt.menu:/etc/X11/rxvt.menu Rxvt.preeditType:Root 以上配置用於更改rxvt的風格及中文字體. 9.reboot 到此,我們的漢化工作基本告成, 此時系統一般會占用400M左右的空間. 接下來就用apt-get去安裝你想要的軟件吧. Enjoy it!



Copyright © Linux教程網 All Rights Reserved