QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7316|回复: 14

感觉这里用Debian的人不多, 所以整理出一篇文章来普及一

[复制链接]
发表于 2003-5-15 23:07:36 | 显示全部楼层 |阅读模式
Debian Woody 3.0r1安装汉化指南
[code:1]本文不对LINUX各种发行版孰能孰不能做出评论。
本文基于http://www.linuxsir.com Debian版的某些文章,再加上本人几次安装过程中总结的一点经验综合整理而成, 感谢文章原作者的工作, 这里就不一一列出
[/code:1]
      1.安装基本系统,大约70M,之后先不必使用tasksel和dselect安装其它软件;

      2.更新apt sourcelist:

将如下几行加到/etc/apt/source.list中:
[code:1]deb http://ftp.jp.debian.org/debian/ unstable main non-free contrib   #日本的apt server,更新较快,速度可以
deb http://marillat.free.fr/ unstable main     #mplayer在此服务器上
[/code:1]
然后执行apt-get update来更新apt-cache.

      3.更新内核版本:

#apt-get install kernel-image
列出以下版本的内核:
[code:1]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
[/code:1]
我们的目的是升级到2.4.20版本,选择适合你的CPU的内核.
例如我的CPU是INTEL的P4-1.8G,所以选686的:
[code:1]# apt-get install kernel-image-2.4.20-686
[/code:1]
取回新的内核映像后,接下来的第一个提示是:
[code:1]Do you want to stop now? [Y/n]
[/code:1]
这里应该打n,除非你想中途退出.

接下来,安装过程会提示是否使用现有的LILO配置:
[code:1]You already have a LILO configuration in /etc/lilo.conf
Install a boot block using the existing /etc/lilo.conf? [Yes]
[/code:1]
直接回车,或打Yes就完成了kernel的安装.

由于安装过程不会自动修改你的lilo.conf,所以接下来要手动修改一下:

首先为你的新内核的initrd做一个符号链接:
[code:1]#ln -s /boot/initrd-xxx(xxx根据你的内核版本而定) /boot/initrd
[/code:1]
做symbol link的好处就是你今后再升级内核的时候,不必再改lilo配置文件,只需重建这个符号链接就行了.

其次,修改你的lilo.conf
[code:1]#vi /etc/lilo.conf
找到image=/vmlinuz,在它下边增加一行:initrd=/boot/initrd
[/code:1]
最后重新引导记录:
[code:1]#lilo -v -v -v
[/code:1]

[code:1]#reboot
[/code:1]
重启之后,有时会遇到网卡不能正确被识别的问题,一般需要在/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)

[code:1]#apt-get install x-window-system-core
[/code:1]
取回X-server及相关软件包之后,会提示你做一些简单的X的配置;

接下来会有两个提示:
[code:1]Do you want to upgrade glibc? [Y/n]
Do you want to restart services? [Y/n]
[/code:1]
直接打Y或回车确定.

接下运行tasksel,选择X Window system,用来安装X的其它组件.

X的安装完成.

      5.安装一个窗口管理器,这里介绍wmaker

[code:1]#apt-get install wmaker wmaker-data wmakerconf wmakerconf-data
[/code:1]
到这里,我们已经基本安装完成,接下来进行汉化的工作.

      6.用defoma安装中文字体

6-a.安装defoma (Debian Font Manager):
[code:1]#apt-get install defoma
[/code:1]
6-b.安装x-ttcidfont-conf (Configure TrueType and CID fonts for X):
[code:1]#apt-get istall x-ttcidfont-conf
[/code:1]
6-c.安装文鼎的四个字体文件:
[code:1]#apt-get install ttf-arphic-*
[/code:1]
6-d.安装xfs-xtt (X TrueType-Font Server):
[code:1]#apt-get install xfs-xtt
[/code:1]
6-e.在/etc/X11/XF86config-4文件中添加如下字体路径:
[code:1]    FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
    FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/CID"
[/code:1]
6-f.安装simsun.ttf字体
先取回simsun字体,放到以下目录:
[code:1]#mkdir /usr/share/fonts/truetype/sim
#cp simsun.ttf /usr/share/fonts/truetype/sim/
[/code:1]
6-g.为simsun.ttf字体编写hints文件(或用defoma-hints truetype simsun.ttf > simsun.hints来生成)
[code:1]#cd /etc/defoma/hints
#vi ttf-sim-simsun.hints
[/code:1]
内容如下:
[code:1]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
[/code:1]
注意:begin与end的前边不要有空格.

6-h.将写好的hints文件注册到defoma:
[code:1]#defoma-font reregister-all ttf-sim-simsun.hints
[/code:1]
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:
[code:1]#apt-get install locales
[/code:1]
取回软件包后,在配置界面中选择zh_CN GB2312, 默认的locales选择zh_CN.

      8.设置字体及输入法

8-a.修改gtkrc.zh_CN更换字体:

内容如下:
[code:1]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"
[/code:1]
8-b.修改wmaker配置文件更换字体:
[code:1]#vi ~/GNUstep/Defaults/WindowMaker
[/code:1]
将每个字体的后边加上simsun的字体,例如:
[code:1]"-原-来-的-字-体-,-sim-simsun-medium-r-normal--14-*-*-*-*-*-gb2312.1980-0";
[/code:1]
8-c.编辑~/GNUstep/Defaults/WMGLOBAL文件(无此文件就新创建一个):

内容如下:
[code:1]{
MultiByteText = YES;
}
[/code:1]
8-d.安装fcitx:
[code:1]#apt-get install fcitx
[/code:1]
装完后,将以下三行加到~/.bashrc中:
[code:1]export XMODIFIERS="@im=fcitx"
export XIM=fcitx
export XIM_PROGRAM=fcitx
[/code:1]
8-e.安装rxvt rxvt-ml:
#apt-get install rxvt rxvt-ml

rxvt-ml中含有支持简体中文的crxvt-gb和繁体中文的crxvt-big5两个版本

修改~/.Xresources文件,添加如下内容:
[code:1]!! 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
[/code:1]
以上配置用于更改rxvt的风格及中文字体.


      9.reboot

      到此,我们的汉化工作基本告成, 此时系统一般会占用400M左右的空间.

接下来就用apt-get去安装你想要的软件吧.
      
Enjoy it!
发表于 2003-5-17 12:29:23 | 显示全部楼层
但内核还是自己编好,定制嘛!
回复

使用道具 举报

发表于 2003-5-19 00:53:50 | 显示全部楼层
如果用4.3的xfree就需要修改etc/fonts/fonts.conf文件了.
回复

使用道具 举报

发表于 2003-5-21 06:48:27 | 显示全部楼层
太麻烦了!跟 gentoo 差不多!
回复

使用道具 举报

发表于 2003-5-23 19:15:04 | 显示全部楼层
请问这个是专给reiserfs用的?
kernel-image-2.2.20-reiserfs 2.2.20-4
回复

使用道具 举报

发表于 2003-9-7 04:29:27 | 显示全部楼层
晕了ing.....
回复

使用道具 举报

发表于 2003-9-22 13:32:36 | 显示全部楼层
好文,早看到就好了,就不会在自己装的时候先装了一大堆东西再升级、升级的。搞到现在不敢升内核。
回复

使用道具 举报

发表于 2003-9-27 13:48:04 | 显示全部楼层
原文:
//begin
重启之后,有时会遇到网卡不能正确被识别的问题,一般需要在/etc/modules.conf中增加网卡的module,

例如我的网卡是3COM的,就加上 alias eth0 3c59x 即可;
如果用vmware安装的,就加上 alias eth0 pcnet32;
如果是tp-link,D-link,intel-2114x之类普通的牌号,一般加上 alias eth0 tulip 就可.
//end

我的网卡是
Realtek RTL8139 Family PCI Fast Ethernet NIC

那我应该填什么啊?
回复

使用道具 举报

发表于 2003-9-27 19:08:04 | 显示全部楼层
[quote:bd74be601b="gye"]原文:
//begin
重启之后,有时会遇到网卡不能正确被识别的问题,一般需要在/etc/modules.conf中增加网卡的module,

例如我的网卡是3COM的,就加上 alias eth0 3c59x 即可;
如果用vmware安装的,就加上 alias eth0 pcnet32;
如果是tp-link,D-link,intel-2114x之类普通的牌号,一般加上 alias eth0 tulip 就可.
//end

我的网卡是
Realtek RTL8139 Family PCI Fast Ethernet NIC

那我应该填什么啊?[/quote]
RTL8139的支持已经被Debian直接编译进了内核里面,不用设置
回复

使用道具 举报

发表于 2003-9-29 11:48:43 | 显示全部楼层
哪个这么麻烦的?我没有装这个多复杂的东东啊.直接装gnome-2.4.再用simsun美化,再装xmms.gaim(carlos兄提供).mplayer.realplayer.就行了.下次我贴些图上来.
回复

使用道具 举报

发表于 2003-10-3 20:05:33 | 显示全部楼层
不错
回复

使用道具 举报

 楼主| 发表于 2003-10-5 12:50:28 | 显示全部楼层
[quote:9005a380c3="gye"]原文:
//begin
重启之后,有时会遇到网卡不能正确被识别的问题,一般需要在/etc/modules.conf中增加网卡的module,

例如我的网卡是3COM的,就加上 alias eth0 3c59x 即可;
如果用vmware安装的,就加上 alias eth0 pcnet32;
如果是tp-link,D-link,intel-2114x之类普通的牌号,一般加上 alias eth0 tulip 就可.
//end

我的网卡是
Realtek RTL8139 Family PCI Fast Ethernet NIC

那我应该填什么啊?[/quote]

tulip 应该可以。
回复

使用道具 举报

发表于 2004-2-27 22:37:17 | 显示全部楼层
It's Nice !!!
回复

使用道具 举报

发表于 2004-3-1 18:43:13 | 显示全部楼层
升级到2.6.3内核,使用grub,怎样作呢?
回复

使用道具 举报

发表于 2004-3-7 12:34:53 | 显示全部楼层
[quote:a486bac545="raink"]如果用4.3的xfree就需要修改etc/fonts/fonts.conf文件了.[/quote]
how to change "etc/fonts/fonts.conf"?
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-10-5 12:23 , Processed in 0.064250 second(s), 16 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表