从硬盘安装debian到系统中文化
时间:2006-06-13 来源:苏恒
通过几天的查找资料,网上有很多资料,也有很多方法.现在我结合自己的实践,总结一下具体且通用的硬盘安装.
安装前的准备
1.首先去debian官方下载完整的安装包iso镜象,和vmlinuz initrd.gz
并将他们放在你的某个分区,如fat32,ext等
2.引导安装程序
如果你是windows系列用户,可以选择grub for dos,也可以使用一些dos系统盘自带的grub.
启动grub后,输入e,
grub>find /vmlinux 寻找mlinuz所在分区假设它是(hd0,5)发现了.
grub>kernel (hd0,5)/vmlinuz root=/dev/ram0 ramdisk_size=25600
grub>initrd (hd0,5)/initrd.gz
grub>boot
3.开始基本系统安装
如果一切正常就开始安装了.
注意,一开始最好不要选中文,可以到后面在选择安装.(我第一次安装时候选择了,后来因为系统环境还没完善,中文全都是乱码)
一般20分钟后就可以完成基本安装了.
4.配置apt和桌面系统
系统自动进入base-config
先选择运行shell
因为我们有完整的iso,所以可以挂载iso做为apt源.
mkdir mnt/d
mkdir mnt/iso
mount -t vfat -o codepage=936,iocharset=cp936 /dev/hda5 /mnt/d
mount -t iso9660 -o loop debian*.iso /dev/hda5 /mnt/iso
cd /mnt/iso 进入iso
ls 查看是否正确
exit
配置apt
加入filesytem /mnt/iso
再选择一个china的源,可以去linuxsir论坛的debian置顶贴中找一个好适合自己的源
5.桌面系统
接下来要中文debian
如果没有安装locales的请安装locales:
apt-get install locales
若已经安装了locales,就重新设定语系:
dpkg-reconfigure locales
选择生成下列语系的数据:
en_US.ISO-8859-1
en_US.UTF-8
zh_CN.GB2312
zh_CN.UTF-8
zh_CN.GBK
zh_TW.BIG5
zh_TW.UTF-8 再将默认locale选择为zh_CN.UTF-8 重起一下机子 安装firefly修正的一些包。
在/etc/apt/sources.list中加入源地址:
deb http://debian.okey.net/debian-uo/ sid firefly
或者deb ftp://ftp.hk.debian.org/unofficial/firefly/binary-i386 ./
更新后安装firefly-sung
apt-get update
apt-get install ttf-firefly-sung
安装字体
直接通过apt来安装。
apt-get install ttf-arphic-bkai00mp tf-arphic-gbsn00lp ttf-arphic-bsmi00lp
ttf-arphic-gkai00mp
使用台湾萤火虫(firefly)——文鼎PL新宋。
在/etc/apt/sources.list中加上新宋字体的apt仓库源:
deb ftp://debian.linux.org.tw/pub/apt unstable main
或者 deb ftp://ftp.hk.debian.org/unoffical/dlot-apt unstable main
然后更新apt repositories数据,就可以安装firefly的字体了。
#apt-get update
#apt-get install ttf-fireflysung
最后安装gnome apt-get install x-window-sytem-core gnome-core 就可以看到中文了 如果先装gnome的话,或许会发现中文,无法显示,且成了一个个有数字的小方格,很是痛苦.不过也不要紧.只要补上上面的字体,重起gnome就可以了. 配置x-window 2.1、修改X-windows配置
X-windows配置文件在/etc/X11/XF86Config-4中。有三种方法(建议用第C种):
a.纯字符界面:
xf86config
b.字符图形界面:
dpkg-reconfigure xserver-xfree86
c.自动检测:
apt-get install xdebconfigurator
自动检测硬件
xdebconfigurator
根据检测结果修改XF86Config-4文件
dexconf 启动gnome startx
安装nvidia显卡驱动(如果是nvidia显卡则必须)
安装nvidia驱动
#apt-get install nvidia-kernel-common_1.0.7174-1_all.deb
#apt-get install nvidia-kernel-2.6.8-1-386_1.0.6629+1_i386.deb
#apt-get install nvidia-glx_1.0.6629+1-2_i386.deb
上面3个文件可用立得新软件包管理器直接搜索,加载nvidia内核模块,可以
每次开机后执行一次
#modprobe nvidia
也可在/etc/modules中增加一行内容
nvidia
然后执行:
#update-modules
2.2.2、修改XF86Config-4文件,文件中
Load "dri"
Load "Glcore"
Option "UseFBDev" "true"
<code>
上列3行前加#号或直接删除这几行;将
<code>
Driver "nv"
修改为
Driver "nvidia";
nvidia中BusID据实填,我填的是
BusID "PCI:1:0:0"
因为
#lspci
后的输出如下:
0000:01:00.0 VGA compatible controller: nVidia Corporation NV10 [GeForce 256 SDR ] (rev 10)
安装中文输入法fcitx
#apt-get install fcitx
新建文件/etc/X11/Xsession.d/25xchinput-start,使启动X窗口自动启动fcitx做为汉字输入法,该文件内容如下:
export G_FILENAME_ENCODEING=@GBK
export LANG=zh_CN.GB2312
export XMODIFIERS=@im=fcitx
fcitx
安装firefox中文版本 apt-get install mozilla-firefox mozilla-firefox-locale-zh-cn
最后更新一下系统
接着用命令升级
apt-get update
apt-get upgrade
apt-get dist-upgrade
apt-get install locales
若已经安装了locales,就重新设定语系:
dpkg-reconfigure locales
选择生成下列语系的数据:
en_US.ISO-8859-1
en_US.UTF-8
zh_CN.GB2312
zh_CN.UTF-8
zh_CN.GBK
zh_TW.BIG5
zh_TW.UTF-8 再将默认locale选择为zh_CN.UTF-8 重起一下机子 安装firefly修正的一些包。
在/etc/apt/sources.list中加入源地址:
deb http://debian.okey.net/debian-uo/ sid firefly
或者deb ftp://ftp.hk.debian.org/unofficial/firefly/binary-i386 ./
更新后安装firefly-sung
apt-get update
apt-get install ttf-firefly-sung
安装字体
直接通过apt来安装。
apt-get install ttf-arphic-bkai00mp tf-arphic-gbsn00lp ttf-arphic-bsmi00lp
ttf-arphic-gkai00mp
使用台湾萤火虫(firefly)——文鼎PL新宋。
在/etc/apt/sources.list中加上新宋字体的apt仓库源:
deb ftp://debian.linux.org.tw/pub/apt unstable main
或者 deb ftp://ftp.hk.debian.org/unoffical/dlot-apt unstable main
然后更新apt repositories数据,就可以安装firefly的字体了。
#apt-get update
#apt-get install ttf-fireflysung
最后安装gnome apt-get install x-window-sytem-core gnome-core 就可以看到中文了 如果先装gnome的话,或许会发现中文,无法显示,且成了一个个有数字的小方格,很是痛苦.不过也不要紧.只要补上上面的字体,重起gnome就可以了. 配置x-window 2.1、修改X-windows配置
X-windows配置文件在/etc/X11/XF86Config-4中。有三种方法(建议用第C种):
a.纯字符界面:
xf86config
b.字符图形界面:
dpkg-reconfigure xserver-xfree86
c.自动检测:
apt-get install xdebconfigurator
自动检测硬件
xdebconfigurator
根据检测结果修改XF86Config-4文件
dexconf 启动gnome startx
安装nvidia显卡驱动(如果是nvidia显卡则必须)
安装nvidia驱动
#apt-get install nvidia-kernel-common_1.0.7174-1_all.deb
#apt-get install nvidia-kernel-2.6.8-1-386_1.0.6629+1_i386.deb
#apt-get install nvidia-glx_1.0.6629+1-2_i386.deb
上面3个文件可用立得新软件包管理器直接搜索,加载nvidia内核模块,可以
每次开机后执行一次
#modprobe nvidia
也可在/etc/modules中增加一行内容
nvidia
然后执行:
#update-modules
2.2.2、修改XF86Config-4文件,文件中
Load "dri"
Load "Glcore"
Option "UseFBDev" "true"
<code>
上列3行前加#号或直接删除这几行;将
<code>
Driver "nv"
修改为
Driver "nvidia";
nvidia中BusID据实填,我填的是
BusID "PCI:1:0:0"
因为
#lspci
后的输出如下:
0000:01:00.0 VGA compatible controller: nVidia Corporation NV10 [GeForce 256 SDR ] (rev 10)
安装中文输入法fcitx
#apt-get install fcitx
新建文件/etc/X11/Xsession.d/25xchinput-start,使启动X窗口自动启动fcitx做为汉字输入法,该文件内容如下:
export G_FILENAME_ENCODEING=@GBK
export LANG=zh_CN.GB2312
export XMODIFIERS=@im=fcitx
fcitx
安装firefox中文版本 apt-get install mozilla-firefox mozilla-firefox-locale-zh-cn
最后更新一下系统
接着用命令升级
apt-get update
apt-get upgrade
apt-get dist-upgrade
相关阅读 更多 +