|
发表于 2003-9-30 21:14:35
|
显示全部楼层
三:基本系统中文化定制
//这样,我们得到了解压缩的基本系统和主系统,下面就对其修改适合我们中文化的需要(接上面)
//时区修正:我们多数基于x86机器使用的BIOS系统时钟都是设到本地时区时间的,而mophix假定你设的是UTC,本地时区也未设到中国所在的东八区,对于时间敏感的程序,这样会有问题
//以下将其改为取得的BIOS时间作为本地时钟看待,当前时区为中国(代表城市重庆)
#cp /usr/share/zoneinfo/Asia/Chongqing morphix_base/etc/localtime
//(not use soft link! at here,base system not include many zoneinfo file)
//创建 morphix_base/etc/timezone 包括如下内容:
Asia/Chongqing
//编辑morphix_base/etc/default/rcS,作如下修改
# Set UTC=yes if your system clock is set to UTC (GMT), and UTC=no if not.
UTC=no
//在mophix_base/etc/rcS.d/创建如下链接
S18hwclockfirst.sh -> ../init.d/hwclockfirst.sh
S50hwclock.sh -> ../init.d/hwclock.sh
//中文支持(语言编码及输入法支持):
//编辑morphix_base/etc/init.d/knoppix-autoconfig,找到对应行作如下修改
# will be overridden via "lang=de" boot commandline
LANGUAGE="$(getbootparam lang 2>/dev/null)"
[ -n "$LANGUAGE" ] || LANGUAGE="us"
change to
[ -n "$LANGUAGE" ] || LANGUAGE="cn"
cn)
LANGUAGE=zh_CN.GBK
LANG=zh_CN.GBK
XMODIFIERS="@im=fcitx"
//这样,不加任何启动参数时默认启动中文环境
四:主系统中文化定制
主系统的中文化与标准的KNOPPIX和其它Linux系统基本一样,这里仅列出不同和需注意的地方:
#cp /etc/resolv.conf morphix_mainmod/etc/
//改变debian apt sources.list,这里简单copy主机的sources.list到morphix_mainmod
#cp /etc/apt/sources.list morphix_mainmod
#cd morphix_mainmod/etc
#ln -s ../usr/share/zoneinfo/Asia/Chongqing localtime
#cd ../../
#cp morphix_base/timezone morphix_mainmod/etc/
//进入chroot环境,安装软件包
#chroot morphix_mainmod
//注意以下为chroot环境
#mount -t proc /proc proc
#apt-get update
//创建etc/locale.gen,包含如下内容
en_US ISO-8859-1
en_US.ISO-8859-15 ISO-8859-15
en_US.UTF-8 UTF-8
zh_CN GB2312
zh_CN.GB18030 GB18030
zh_CN.GBK GBK
zh_CN.UTF-8 UTF-8
zh_HK BIG5-HKSCS
zh_HK.UTF-8 UTF-8
zh_TW BIG5
zh_TW.EUC-TW EUC-TW
zh_TW.UTF-8 UTF-8
//生成所需的locale
#locale-gen
//安装localepurge,它可以自动在安装新软件后删除无用的locale文件,大大节约空间
#apt-get install localepurge
//安装中文软件包
#apt-get install fcitx openoffice.org-l10n-zh-cn
//.....
//清理垃圾
#apt-get clean
//其它清理动作
....
//特别注意:所有的默认用户级配置文件都在etc/skel,系统启动时会把这些文件copy到/home/morph用户目录,所以把你需要的特别软件配置文件copy到此目录
//如fcitx用的.gWuBi目录等
//如需自动启动fcitx或其他软件,将其fcitx&加入etc/skel/.xinitrc etc/skel/.xsession
//其它如具体的中文字体安装,openoffice汉化等不再详述..
//退出chroot环境
#umount proc
#CTRL+D退出chroot
//至此,修改及汉化完成,下面描述如何生成新的定制后的ISO..(待续..) |
|