一、安裝debian時候提示是否須要網絡資源,選擇YES。安裝完成後apt-get是沒法直接獲取網上的源的,須要手動設置一下:
/etc/apt/sources.list
...... 省略
5 #deb cdrom:[Debian GNU/Linux 6.0.1a _Squeeze_ - Official i386 DVD Binary
-1 20110322-15:11]/ squeeze contrib main
...... 省略
將關鍵字cdrom所在行註釋掉,由於安裝的時候就選擇了網絡源,下面就是相關的網絡源:
3 # deb cdrom:[Debian GNU/Linux 6.0.1a _Squeeze_ - Official i386 DVD Binar
y-1 20110322-15:11]/ squeeze contrib main
4
5 #deb cdrom:[Debian GNU/Linux 6.0.1a _Squeeze_ - Official i386 DVD Binary
-1 20110322-15:11]/ squeeze contrib main
6
7 deb http://cdn.debian.net/debian/ squeeze main
8 deb-src http://cdn.debian.net/debian/ squeeze main
9
10 deb http://security.debian.org/ squeeze/updates main contrib
11 deb-src http://security.debian.org/ squeeze/updates main contrib
12
13 # squeeze-updates, previously known as 'volatile'
14 deb http://cdn.debian.net/debian/ squeeze-updates main contrib
15 deb-src http://cdn.debian.net/debian/ squeeze-updates main contrib
3 # deb cdrom:[Debian GNU/Linux 6.0.1a _Squeeze_ - Official i386 DVD Binar
y-1 20110322-15:11]/ squeeze contrib main
4
5 #deb cdrom:[Debian GNU/Linux 6.0.1a _Squeeze_ - Official i386 DVD Binary
-1 20110322-15:11]/ squeeze contrib main
6
7 deb http://cdn.debian.net/debian/ squeeze main
8 deb-src http://cdn.debian.net/debian/ squeeze main
9
10 deb http://security.debian.org/ squeeze/updates main contrib
11 deb-src http://security.debian.org/ squeeze/updates main contrib
12
13 # squeeze-updates, previously known as 'volatile'
14 deb http://cdn.debian.net/debian/ squeeze-updates main contrib
15 deb-src http://cdn.debian.net/debian/ squeeze-updates main contrib
二、安裝vim軟件。debina 或 ubuntu 所附的 vim 為精簡版的,因此不能顯示顏色,需安裝完整版
apt-get install -y vim
修改/etc/vim/vimrc
........省略
syntax on \\高亮顯示
set incsearch \\搜索關鍵字高亮顯示
........省略
三、習慣了redhat,debian系統安裝完後都是單色顯示,並且好多經常使用命令別名也不存在了,如今一併修改。
/root/.bashrc
............. 省略
# You may uncomment the following lines if you want `ls' to be colorized:
export LS_OPTIONS='--color=auto'
eval "`dircolors`"
alias ls='ls $LS_OPTIONS'
alias ll='ls $LS_OPTIONS -l'
alias l='ls $LS_OPTIONS -lA'
#
# Some more alias to avoid making mistakes:
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
........... 省略
apt-get install -y vim
修改/etc/vim/vimrc
........省略
syntax on \\高亮顯示
set incsearch \\搜索關鍵字高亮顯示
........省略
三、習慣了redhat,debian系統安裝完後都是單色顯示,並且好多經常使用命令別名也不存在了,如今一併修改。
/root/.bashrc
............. 省略
# You may uncomment the following lines if you want `ls' to be colorized:
export LS_OPTIONS='--color=auto'
eval "`dircolors`"
alias ls='ls $LS_OPTIONS'
alias ll='ls $LS_OPTIONS -l'
alias l='ls $LS_OPTIONS -lA'
#
# Some more alias to avoid making mistakes:
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
........... 省略
source /root/.bashrc
四、linux啓動過程最後一個文件是/etc/rc.local,debian中將須要啓動的文件寫在exit 0 前便可。
五、設定系統時間
# apt-get install ntpdate
# ntpdate cn.pool.ntp.org
六、關閉不須要的端口,以關閉exim4 25 端口爲例:
#update-rc.d exim4 remove
#update-rc.d exim4 remove
打開exim4 25 端口:
#update-rc.d exim4 start 18 2 3 5 . stop 18 0 1 6 . \\注意最後以「.」結尾
#update-rc.d exim4 start 18 2 3 5 . stop 18 0 1 6 . \\注意最後以「.」結尾