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

2011年2月27日

ADSL

  • 安裝 pppoeconf

    # apt-get install pppoeconf

  • 執行 pppoeconf

    在console下打pppoeconf,輸入你的相關adsl設定資訊,最後回到終端機,再用pon dsl-provider,相信就可以連線adsl了。

  • 簡單的啟動 script

    建立一個內容如下的 script 檔案,我們姑且就取名為 adsl:

    #!/bin/bash

    case "$1" in
    start)
    echo "starting ADSL service"
    /usr/bin/pon dsl-provider
    ;;
    stop)
    echo "stop ADSL connection"
    /usr/bin/poff dsl-provider
    ;;
    restart)
    echo "Stop && Starting ADSL connetion"
    $0 stop
    $0 start
    ;;
    esac

    編寫完畢之後將它放到 /etc/init.d 底下,以後想要啟動 adsl 時就下以下指令:

    # /etc/init.d/adsl start

Ref:
1. http://people.debian.org.tw/~moto/debian/DebianLessPain/Debian-Install-Guide-15.html
2.http://jonny.ubuntu-tw.net/2008/08/networkpppoe-adsl.html
3.http://jonny.ubuntu-tw.net/2009/10/manual-pppoe-on-debian.html

2011年2月18日

Install JAVA in Debian system

install java (http://www.java.com/en/download/index.jsp)

install java plugin to iceweasel(http://www.java.com/en/download/help/linux_install.xml#enable):

  1. Create a symbolic link to the libjavaplugin.so file in the browser plugins directory
    • Go to the plugins sub-directory under the Firefox installation directory
      cd /plugins
      (such as /usr/lib/iceweasel/plugins/)

    • Create the symbolic link
      ln -s /plugin/i386/
      ns7/libjavaplugin_oji.so

      In the ln command line above, use ns7-gcc29 if Firefox was compiled with gcc2.9.

    If you install Firefox 1.5 or later, you can enable the Java Console menu item in the Tools menu. Change directories to the Firefox extensions directory, then unzip ffjcext.zip there.
    cd /usr/lib/firefox-1.4/extensions
    unzip /usr/java/jre1.6.0/lib/deploy/ffjcext.zip

2011年2月17日

Add chinese-cht & other related softwares

aptitude install ttf-arphic-uming

http://isis.poly.edu/~qiming/chinese-debian-mini-howto.html
1.Run dpkg-reconfigure locales, and choose the following items.

* en_US ISO-8859-1
* zh_CN GB2312
* zh_CN.GBK GBK
* zh_CN.UTF-8 UTF-8
* zh_TW BIG5
* zh_TW.UTF-8 UTF-8
2.
apt-get install ttf-arphic-gbsn00lp ttf-arphic-gbsn00lp
----------------------------------------------------------

安裝中文字型


中文點陣字型(文泉驛字型)
debian5 # aptitude install xfonts-wqy

中文向量字型(文鼎明、楷體)
debian5 # aptitude install ttf-arphic-bkai00mp ttf-arphic-uming


安裝中文輸入法

debian5 # aptitude install gcin gcin-qt3-immodule im-switch

gcin OFFICIAL Web:http://cle.linux.org.tw/trac/wiki/GcinInstallBoshiamy

Ref: http://blog.yam.com/wjyaries/article/20436703

2011年2月13日

為vim加顏色

debina 或 ubuntu 所附的 vim 為精簡版的,所以不能顯示顏色,需安裝完整版
apt-get install -y vim
然後編輯vim 的設定檔
vim /etc/vim/vimrc
"syntax on
"set background=dark
↑把前面的"號拿掉
set ignorecase
"↑設定搜尋時英文不分大小寫
set hlsearch
"↑將搜尋到的字加hilight
highlight Search term=reverse ctermbg=4 ctermfg=7
"↑將搜尋到的字由土黃色變成深藍色

Debian安裝筆記