TableOfContents

如未特别说明,以下使用的Linux发布版本为ubuntu feisty

Linux温州论坛

Linux温州论坛(邮件列表)成立,旨在为温州的Linux爱好者提供一个交流的平台。

订阅 linux-wz

电子邮件:

访问此论坛

debian安装

事先在硬盘上准备一个未分区的空间,至少5G。最好先备份硬盘上的重要数据,或者使用完全空闲的硬盘。

下载debian安装光盘的镜像文件。完整版需要很多光盘。如果网络条件许可,使用网络安装版最方便:http://www.debian.org/distrib/netinst

将镜像刻录成光盘,使用这张光盘引导系统。引导后出来安装界面,安照提示一步一步完成即可。其中在选择apt源的时候,选择cn99的http服务器比较快。

详细安装过程参考debian安装手册 http://debian.linuxsir.org/book/d-i-manual/zh_CN/i386/zh_CN.i386.html/

ubuntu 安装

国内的ubuntu源

    * Archive.ubuntu.com 更新服务器(欧洲):

deb http://archive.ubuntu.com/ubuntu/ feisty main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ feisty-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ feisty-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ feisty-backports main restricted universe multiverse
deb http://archive.ubuntu.org.cn/ubuntu-cn/ feisty main restricted universe multiverse

    * Ubuntu.cn99.com 更新服务器(江苏省常州市电信,推荐电信用户使用。):

deb http://ubuntu.cn99.com/ubuntu/ feisty main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ feisty-updates main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ feisty-security main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ feisty-backports main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu-cn/ feisty main restricted universe multiverse

    * Mirror.lupaworld.com 更新服务器(浙江省杭州市电信,推荐电信用户使用。):

deb http://mirror.lupaworld.com/ubuntu/archive/ feisty main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu/archive/ feisty-security main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu/archive/ feisty-updates main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu/archive/ feisty-backports main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu/ubuntu-cn/ feisty main restricted universe multiverse

    * 上海市交通大学 更新服务器(教育网,推荐校园网和网通用户使用。):

deb http://ftp.sjtu.edu.cn/ubuntu/ feisty main multiverse restricted universe
deb http://ftp.sjtu.edu.cn/ubuntu/ feisty-backports main multiverse restricted universe
deb http://ftp.sjtu.edu.cn/ubuntu/ feisty-proposed main multiverse restricted universe
deb http://ftp.sjtu.edu.cn/ubuntu/ feisty-security main multiverse restricted universe
deb http://ftp.sjtu.edu.cn/ubuntu/ feisty-updates main multiverse restricted universe
deb http://ftp.sjtu.edu.cn/ubuntu-cn/ feisty main multiverse restricted universe

    * 北京市清华大学 更新服务器(教育网,推荐校园网和网通用户使用。):

deb http://mirror.net9.org/ubuntu/ feisty main multiverse restricted universe
deb http://mirror.net9.org/ubuntu/ feisty-backports main multiverse restricted universe
deb http://mirror.net9.org/ubuntu/ feisty-proposed main multiverse restricted universe
deb http://mirror.net9.org/ubuntu/ feisty-security main multiverse restricted universe
deb http://mirror.net9.org/ubuntu/ feisty-updates main multiverse restricted universe
deb http://mirror.net9.org/ubuntu-cn/ feisty main multiverse restricted universe

    * 中国 台湾省台湾大学 更新服务器(推荐网通用户使用,电信PING平均响应速度41MS。)

deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ feisty main restricted universe multiverse
deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ feisty-updates main restricted universe multiverse
deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ feisty-backports main restricted universe multiverse
deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ feisty-security main restricted universe multiverse
deb http://ftp.sjtu.edu.cn/ubuntu-cn/ feisty main multiverse restricted universe

    * Mirror.vmmatrix.net 更新服务器(上海市电信,推荐电信网通用户使用。):

deb http://mirror.vmmatrix.net/ubuntu/ feisty main restricted universe multiverse
deb http://mirror.vmmatrix.net/ubuntu/ feisty-updates main restricted universe multiverse
deb http://mirror.vmmatrix.net/ubuntu/ feisty-backports main restricted universe multiverse
deb http://mirror.vmmatrix.net/ubuntu/ feisty-security main restricted universe multiverse
deb http://ftp.sjtu.edu.cn/ubuntu-cn/ feisty main multiverse restricted universe

我的ubuntu的source.list

deb http://ubuntu.cn99.com/ubuntu/ feisty main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ feisty-updates main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ feisty-security main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ feisty-backports main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu-cn/ feisty main restricted universe multiverse

安装686版的内核代替386版的内核

apt-get install linux-686

ubuntu的优化: http://www.linuxsir.org/bbs/showthread.php?t=264885

ubuntu读写ntfs分区

在source.list上加上

deb http://flomertens.keo.in/ubuntu/ dapper main
deb-src http://flomertens.keo.in/ubuntu/ dapper main

安装ntfs-3g

apt-get install ntfs-3g ntfs-3g-nautilus-tools

启动fuse模块

modprobe fuse

并在/etc/modules中加入一行

fuse

最后修改/etc/fstab,把对应ntfs的分区类型改成ntfs-3g,比如

/dev/hda1       /mnt/hda1   ntfs-3g defaults,nls=utf8,locale=zh_CN.utf8,umask=007,gid=46  0       1

虚拟机安装

安装java

apt-get install sun-java5-jdk
apt-get install sun-java5-plugin
update-alternatives --config java

配置java字体

wget http://paste.ubuntu.org.cn/d323
sudo mv /etc/java-1.5.0-sun/fontconfig.properties /etc/java-1.5.0-sun/fontconfig.properties.old
sudo mv d323 /etc/java-1.5.0-sun/fontconfig.properties
sudo chown root:root /etc/java-1.5.0-sun/fontconfig.properties

在linux下运行windows应用程序

安装wine

apt-get install wine

对wine进行配置。配置比较麻烦。Sidenet提供了一个脚本自动进行配置:http://sidenet.ddo.jp/winetips/config.html

当前在zh_CN.utf8的字符编码环境下,并启动了scim输入法,再运行wine就会很慢。解决办法在http://huangjiahua.livejournal.com/71157.html

在 [http://www.linuxgame.org/] 提供了一些脚本可以对wine进行方便的配置。

1. 关于 wine 在 zh_CN.UTF-8 , Ubuntu/Debian 下慢

wine 在 zh_CN.UTF-8 , Ubuntu/Debian 下启动个 notepad 都非常慢, 而 SUSE 下的却没问题。 看了下, 还是 请求 X core 字体的问题,在 zh_CN.UTF-8 下 wine 会请求 gbk-0 字体 , 而通常 Ubuntu/Debian 都没 gbk-0 字体的, 即使有的话, 用 * 来匹配字体也是很慢的。

一个比较容易想到的是添加 GBK 字体

让 WQY 添加 GBK-0 字体 安装 wqy 后,加个文件/etc/X11/fonts/misc/xfonts-wqy.alias 写入

"-wenquanyi-wenquanyi bitmap song-medium-r-normal--0-0-100-100-p-0-gbk-0" "-wenquanyi-wenquanyi bitmap song-medium-r-normal--0-0-100-100-p-0-iso10646-1" 
"-wenquanyi-wenquanyi bitmap song-medium-r-normal--0-0-75-75-p-0-gbk-0" "-wenquanyi-wenquanyi bitmap song-medium-r-normal--0-0-75-75-p-0-iso10646-1" 

再执行

sudo update-fonts-alias misc
xset fp

这时候 wine 的反映速度就跟 zh_CN 下一样了 ( 启动个 notepad 或者 ms word 来看看 )

中文输入法

小企鹅输入法(五笔、拼音等)

apt-get install fcitx

scim(Smart Common Input Method)

apt-get install scim scim-tables-zh

在debian中安装scim后,输入法可能不会随着X启动而自动加载。可以在/etc/X11/Xsession.d/目录中添加文件95scim,内容如下:

export XMODIFIERS="@im=SCIM"
export GTK_IM_MODULE=scim
scim -d

中文排序

让文件名是中文的文件按照拼音顺序排列:安装locale-pinyin:

sudo apt-get install locale-pinyin 

然后设置LC_COLLATE=zh_CN@pinyin.utf8,可以通过在/etc/environment文件中添加这一行实现:

LC_COLLATE="zh_CN@pinyin.utf8"

然后重新登录就可以起作用了

adsl拨号

使用pppoeconf配置拨号的属性

pppoeconf

使用pon进行拨号

pon dsl-provider

使用poff断开

poff dsl-provider

编辑排版

聊天

使用gaim来上msn messenger, yahoo messenger, icq, google talk, aol等

apt-get install gaim

skype:在/etc/apt/source.list中填加

deb http://debian.bootsplash.de unstable main

然后安装

apt-get install skype

使用qq:

cd;mkdir tmp;cd tmp
wget -c http://download.ubuntu.org.cn/software/lumaqq_2005-linux_gtk2_x86_no_jre.tar.gz
sudo tar zxvf lumaqq_2005-linux_gtk2_x86_no_jre.tar.gz -C /opt/
wget -c http://download.ubuntu.org.cn/software/lumaqq_2005_patch_2006.02.02.15.00.zip
sudo unzip -o lumaqq_2005_patch_2006.02.02.15.00.zip -d /opt/LumaQQ/lib
sudo chown -R root:root /opt/LumaQQ/
sudo chmod -R 755 /opt/LumaQQ/
sudo vi /usr/share/applications/LumaQQ.desktop

添加如下行:

代码:

[Desktop Entry]
Name=LumaQQ
Comment=QQ Client
Exec=/opt/LumaQQ/lumaqq
Icon=/opt/LumaQQ/QQ.png
Terminal=false
Type=Application
Categories=Application;Network;

播放电影

在/etc/apt/source.list中填加

deb ftp://ftp.nerim.net/debian-marillat/ sid main

安装mplayer和解码器

apt-get install mplayer w32codecs

对数码相机的支持

命令行方式使用gphoto2

apt-get install gphoto2

图形界面使用gtkam

apt-get install gtkam

让普通用户有权限使用数码相机。比如让用户czk能用相机

gpasswd -a czk camera

休眠

查看系统支持哪些模式

cat /sys/power/state

echo disk > /sys/power/state

echo mem > /sys/power/state

hp的笔记本从待机恢复后键盘鼠标失去响应的问题,可以在/etc/acpi/suspend.d中新建文件20-i8042-input.sh:

# Unbind the AT keyboard interface.
if [ -f /sys/bus/platform/drivers/i8042/unbind ]; then
  echo -n "i8042" > /sys/bus/platform/drivers/i8042/unbind
fi

在/etc/acpi/resume.d中新建文件80-i8042-input.sh:

# Rebind the AT keyboard interface.
if [ -f /sys/bus/platform/drivers/i8042/bind ]; then
  echo -n "i8042" > /sys/bus/platform/drivers/i8042/bind
fi

linux 进程管理api

moinmoin配置

内核编译

  1. 下载内核:http://www.kernel.org/,解压缩

  2. 配置内核选项:

    cp /boot/config-`uname -r` ./.config
    make menuconfig
  3. 编译内核:

    make-kpkg clean
    fakeroot make-kpkg --initrd --append-to-version=-custom kernel_image kernel_headers
  4. 安装内核:

    dpkg -i linux-image-2.6.18.1-custom_2.6.18.1-custom-10.00.Custom_i386.deb
    dpkg -i linux-headers-2.6.18.1-custom_2.6.18.1-custom-10.00.Custom_i386.deb
  5. 修改引导文件:

    vi /boot/grub/menu.lst
    
    title           Ubuntu, kernel 2.6.18.1-custom
    root            (hd0,0)
    kernel          /boot/vmlinuz-2.6.18.1-custom root=/dev/sda1 ro quiet splash
    initrd          /boot/initrd.img-2.6.18.1-custom
    savedefault
    boot
    
    title           Ubuntu, kernel 2.6.18.1-custom (recovery mode)
    root            (hd0,0)
    kernel          /boot/vmlinuz-2.6.18.1-custom root=/dev/sda1 ro single
    initrd          /boot/initrd.img-2.6.18.1-custom
    boot
  6. 使用新内核重启

参考资源

ch3n2k.com | Copyright (c) 2004-2020 czk.