2011年4月28日

synchronize Time and date with NTP

apt-get install ntp ntpdate ntp-server

or

apt-get install ntp ntpdate

Ref: http://www.debianadmin.com/ntp-server-and-client-configuration-in-debian.html

2011年4月26日

Install gcin in debian system

Install -
sudo apt-get install gcin gcin-qt3-immodule im-switch

Description -
gcin - the main modules of gcin
gcin-qt3-immodule - Unknow
im-switch - switch different input

Set gcin as a default input -
$ im-switch -s gcin


Ref: Miraculist's Blog

Disable IPv6 in Debian system

Step 1.
# vi /etc/modprobe.d/aliases
or
# vi /etc/modprobe.d/aliases.conf

Step 2.
find

alias net-pf-10 ipv6

Replace with

alias net-pf-10 off
alias ipv6 off

Ref:http://www.cyberciti.biz/tips/linux-how-to-disable-the-ipv6-protocol.html

2011年4月8日

配置/etc/apt/source.lists

在/etc/apt/sources.list中添加更新源:
  • deb http://debian.cn99.com/debian/ stable main non-free contrib
  • deb http://debian.cn99.com/debian-non-US/ stable/non-US main contrib non-free

#apt-get update

#apt-get install apt-spy

  • # mv sources.list sources.list.bak // 備份老大源列表
  • #man apt-spy // 獲取詳細的使用方法

  • // 更新您的鏡像列表文件 /var/lib/apt-spy/mirrors.txt
  • # apt-spy update

  • // 在亞洲尋找速度最快的stable版鏡像, 並生成sources.list文件
  • # apt-spy -d stable -a Asia
  • # cp /etc/apt/sources.list.d/apt-spy.list /etc/apt/sources.list

註:實際上經過上述搜索找到的是ftp.tw.debian.org,但是我ping了一下,發現需要37.*ms左右,比debian99.cn要慢。估計是apt-spy不一定能找到所有的source.

  • // 更新源:
  • # apt-get update
Ref: http://blog.csdn.net/bennyfun79/archive/2009/05/07/4160841.aspx


-------------------------------------------------------------------------------------------------

記下這個應該不是太難吧,路徑就在/etc/apt/sources.list

deb http://ftp.de.debian.org/debian/ etch main contrib non-free

保存一下,以後就用這個啦 apt-spy

雖然才幾百K大小的工具,但是可別小看了它。

可以根據我們的設置,自動生成一份速度最快的sources.list文件。

具體用法可以man一下 man apt-spy

NAME
apt-spy – program to generate a /etc/apt/sources.list file

SYNOPSIS
apt-spy -d distribution [ -a area ] [ -c config ] [ -e number ] [ -f file ] [ -i file ] [ -m mirror-list ] [ -o output-
file ] [ -p proxy ] [ -s country-list ] [ -t time ] [ -u update-URL ] [ -w file ] [ -n number ] [ -h ] [ -v ] [ update ]

-d 指的是什麼版本, -a是area也就是地區,-t時間選項 -e指定服務器的數量

其他的-p代理 -i -什麼的沒去試。用的時候如果忘記了man一下得了。

記得先備份一下你自己的sources.list這個文件,如果感覺不好就改回原來的,青菜蘿蔔嘛~

apt-spy -d stable -a asia -t 1