您的位置:首页 > 其它

Ubuntu 7.10(Gutsy Gibbon) 配置

2008-01-23 10:51 253 查看
Ubuntu 7.10(Gutsy Gibbon) 配置

A. 启动设置简介

1. GRUB配置文件/boot/grub/menu.lst, 修改前备份.

2. 一些内核参数

Parameter
Function
splash
boot with a startup image
quiet
keep boot message from displaying
vga=xxxsetup console frame buffer, detail in section B.
vga=normal, keep normal frame buffer
vga=ask, ask you which mode to choose when boot.
*This argument is not supported by default setup of Ubuntu 7.10.
3. 更多参数参考http://www.mjmwired.net/kernel/Documentation/kernel-parameters.txt

B. 设置控制台缓存

这一部分内容来自于http://www.savvyadmin.com/2007/12/25/console-framebuffer-in-ubuntu

1. 在/etc/initramfs-tools/modules中添加fbcon和vesafb以获系统对显示缓存设置的支持,Ubuntu7.10中默认不支持.

$ echo "vesafb" | sudo tee -a /etc/initramfs-tools/modules
$ echo "fbcon" | sudo tee -a /etc/initramfs-tools/modules

2. 在黑名单/etc/modprobe.d/blacklist-framebuffer中删掉或注释掉模块vesafb.

#blacklist vesafb

3. 在/boot/grub/menu.lst中添加参数,参见下表:

# defoptions=quiet splash vga=791

Colour depth

640x480

800x600

1024x768

1280x1024

1400x1050

1600x1200

8 (256)

769

771

773

775

15 (32K)

784

787

790

793

16 (65K)

785

788

791

794

834

884

24 (16M)

786

789

792

795

4. 更新GRUB设置

$ sudo update-grub

5. 如果Usplash(启动画面)的分辨率高于缓存设置,修改/etc/usplash.conf设置与缓存设置保持一致.

xres=1024
yres=768

6. 更新initramfs,重建启动画面.

$ sudo update-initramfs -u

C. 中文支持

1. 安装中文语言包

$ sudo apt-get install language-pack-zh language-support-zh language-pack-gnome-zh

2. 安装Windows字体, 例如, 宋体(Simsun), Tahoma, Verdana, Courier New...

$ sudo mkdir /usr/share/fonts/winfont
$ sudo cp (Windows Fonts) /usr/share/fonts/winfont
$ cd /usr/share/fonts/winfont
$ sudo mkfontscale
$ sudo mkfontdir
$ sudo fc-cache

3. 安装X11字体支持(这一部不确定是否必需)

apt-get install xfonts-intl-chinese xfonts-intl-chinese-big

4. 设置字体选择顺序, 修改/etc/fonts/language-selector.conf
下边是我的设置,主要是删除了系统自带的字体,使用宋体,宋体之前的两个字体是用来显示其它语言的.

<alias>
<family>serif</family>
<prefer>
<family>Bitstream Vera Serif</family>
<family>DejaVu Serif</family>
<family>SimSun</family>
</prefer>
</alias>
<alias>
<family>sans-serif</family>
<prefer>
<family>Bitstream Vera Sans</family>
<family>DejaVu Sans</family>
<family>SimSun</family>
</prefer>
</alias>
<alias>
<family>monospace</family>
<prefer>
<family>Bitstream Vera Sans Mono</family>
<family>DejaVu Sans Mono</family>
<family>SimSun</family>
</prefer>
</alias>

5. 设置GNOME的字体,System -> Preference -> Appearence -> Fonts.

Application/Document/Desktop font: Tahoma(10)
Window Title font: Tahoma Bold(10)
Fixed Width font: Courier New(10)

Rendering: Monochrome

6. 按'Ctrl + Alt + Backspace'重新启动Xwindow使配置生效.

D. 为GNOME安装一个紧凑的主题

在GNOME默认安装的主题,控件普遍过大,会占据很大的空间,使得工作空间很小.

http://martin.ankerl.com/2007/11/04/clearlooks-compact-gnome-theme/
下载安装: http://martin.ankerl.com/files/ClearlooksCompact.tar.bz2

感谢Martin Ankerl的大作!

E. 安装并配置防火墙GuardDog

1. 安装GuardDog

$ sudo apt-get install guarddog

2. 打开GuardDog,第一次打开会警告文件丢失,忽略即可.

$ gksudo guarddog

3. GuardDog默认不设置任何规则,你必须知道每一个规则是用来干什么的,简单说一下.

打开Protocol页, 选择Internet Zone, 我们最常用的协议有: 用来上网的DNS, HTTP, HTTPS, FTP; 用来收发邮件的POP3, SMTP; 同步时间用的NTP; 安全登录用的SSH; 聊天用的Jabber, MSN; 等等...
打开Advanced页, 选择Enable DHCP on Interfaces.

4. 自定义QQ协议

打开Advanced页, 建立一个新的协议, Name: QQ, Type: UDP, Ports: 4000-8000.
Open tab Protocol, enable QQ protocol.

5. Press apply to take effect

F. 安装输入法 - SCIM

1. 在系统菜单中添加语言支持

System -> Administration -> Language Support

2. 如果需要输入法支持QT,需要安装scim-qtimm,注意只安装scim,realplayer无法启动

$ sudo apt-get install scim-qtimm

找到以下语句:

GTK_IM_MODULE=”scim”
QT_IM_MODULE=”scim”

替换为:

GTK_IM_MODULE=”xim”
QT_IM_MODULE=”xim”

3. 设置scim为默认输入法

$ im-switch -s scim

4. 重启计算机或按Ctrl + Alt + Backspace重启Xwindow生效

G. 安装Real player

1. 下载安装包并安装

$ wget http://www.debian-multimedia.org/pool/main/r/realplay/realplayer_10.0.9-0.1_i386.deb $ sudo dpkg -i realplayer_10.0.9-0.1_i386.deb
$ sudo dpkg -r realplayer

2. 如果在播放rm时非常卡,需要安装并且配置alsa-oss

$ sudo apt-get install alsa-oss

如果安装失败,需要在恢复模式下安装(recovery mode).这时可能需要运行dhclient来获得IP地址.

$ sudo gedit /usr/bin/realplay or $ sudo gedit /usr/bin/realplayer or $ sudo gedit /opt/RealPlayer

找到以下语句:

if [ -n "$LD_PRELOAD" ]; then
echo "Warning: LD_PRELOAD=/"$LD_PRELOAD/""
fi


在其后添加:

LD_PRELOAD="$LDPRELOAD:/usr/lib/libaoss.so"
export LD_PRELOAD


H. 用LiveCD必定Windows启动设置

从LiveCD启动并打开一个终端(terminal).你需要运行几条命令,比如sudo -i,来获得root权限.小心任何一个输入错误,这在root下可能带来不可挽回的结果.
我们需要找到安装Ubuntu的分区.用fdisk -l命令得到分区信息,例如:

$ sudo fdisk -l

Disk /dev/hda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot      Start         End      Blocks   Id  System
/dev/hda1               1           8       64228+  83  Linux
/dev/hda2               9        1224     9767520   83  Linux
/dev/hda3   *        1225        2440     9767520   a5  FreeBSD
/dev/hda4            2441       14593    97618972+   5  Extended
/dev/hda5           14532       14593      498015   82  Linux swap / Solaris
/dev/hda6            2441       14530    97112862   83  Linux

Partition table entries are not in disk order

Here I have three Linux partitions. /dev/hda2 is my root partition, /dev/hda1 is my /boot partition and /dev/hda6 is my /home partitoins. If you only have one, obviously this is the one your Ubuntu system is installed on. If you have more than one and you don't know which one your Ubuntu is installed on, we'll look for it later. First, create a mountpoint for your partition, for example :

$ mkdir /mnt/root

Then mount your partition in it. If you don't know which one it is, then mount any of them, we'll se if it's the correct one.

$ mount -t ext3 /dev/hda2 /mnt/root

Of course, replace /dev/hda2 with the correct name of your partition. You can check if it's the correct one by running ls /mnt/root, which should output something like this :
bin    dev      home        lib    mnt   root     srv  usr
boot   etc      initrd      lib64  opt   sbin     sys  var
cdrom  initrd.img  media  proc  selinux  tmp  vmlinuz

If what you have looks not at all like this, you didn't mount the correct partition. Do umount /mnt/root to unmount it and try another one. You also need to mount your /boot partition if you made one, like this :

$ mount -t ext3 /dev/hda1 /mnt/root/boot

To make sure it was the correct one, run ls /mnt/root/boot, which sould output something like this :
config-2.6.18-3-686      initrd.img-2.6.18-3-686.bak  System.map-2.6.18-3-686
grub                     lost+found                   vmlinuz-2.6.18-3-686
initrd.img-2.6.18-3-686  memtest86+.bin

Once again, if what you have doesn't fit, unmount it and try another partition.
Now that everything is mounted, we just need to reinstall GRUB :

$ grub-install --root-directory=/mnt/root /dev/hda

If you got BIOS warnings try:

$ grub-install --root-directory=/mnt/root /dev/hda --recheck

Of course, replace /dev/hda with the location you want to install GRUB on. If all went well, you should see something like this :

Installation finished. No error reported.
This is the contents of the device map /boot/grub/device.map.

Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.

(hd0) /dev/hda
Now you can reboot and the GRUB menu should appear. If you see a warning message regarding XFS filesystem, you can ignore it.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: