最近幾天折騰了一下Debian 7 (gnome桌面DVD版,KDE桌面CD版最后會提到),總的來說收獲還是挺大的,對比以前使用ubuntu,debian 7給我的感覺像是一個新生嬰兒,不帶多余的花俏,那么的簡單和單純。話不多說,下面寫出自己安裝完debian后碰到的一些問題及解決方法。
1.安裝系統
安裝系統可以參考以下教程:
http://www.jb51.net/os/85858.html
http://forum.ubuntu.org.cn/viewtopic.php?f=165&t=443173
http://www.debian.org/releases/stable/i386/index.html.zh-cn
https://wiki.debian.org/zh_CN/FrontPage?action=show&redirect=%E9%A6%96%E9%A1%B5
步驟很詳細,注意不要設置網絡,不要使用網絡鏡像就行。
2.配置源
1 su - 2 密碼: 3 gedit /etc/apt/sources.list 4 5 添加以下163源: 6 #####################主要,開源,閉源 7 deb http://mirrors.163.com/debian wheezy main non-free contrib 8 deb-src http://mirrors.163.com/debian wheezy main non-free contrib 9 10 ###################wheezy-proposed-updates建議更新 11 deb http://mirrors.163.com/debian wheezy-proposed-updates main contrib non-free 12 deb-src http://mirrors.163.com/debian wheezy-proposed-updates main contrib non-free 13 14 #wheezy-updates推薦更新 15 deb http://mirrors.163.com/debian wheezy-updates main contrib non-free 16 deb-src http://mirrors.163.com/debian wheezy-updates main contrib non-free 17 18 19 #wheezy/updates安全更新 20 deb http://mirrors.163.com/debian-security wheezy/updates main contrib non-free 21 deb-src http://mirrors.163.com/debian-security wheezy/updates main contrib non-free 22 23 deb http://http.us.debian.org/debian wheezy main contrib non-free 24 deb http://security.debian.org wheezy/updates main contrib non-free
#上海交大
deb http://ftp.sjtu.edu.cn/debian wheezy main non-free contrib
deb http://ftp.sjtu.edu.cn/debian wheezy-proposed-updates main non-free contrib
deb http://ftp.sjtu.edu.cn/debian-security wheezy/updates main non-free contrib
deb-src http://ftp.sjtu.edu.cn/debian wheezy main non-free contrib
deb-src http://ftp.sjtu.edu.cn/debian wheezy-proposed-updates main non-free contrib
deb-src http://ftp.sjtu.edu.cn/debian-security wheezy/updates main non-free contrib
#上海交大 ipv6
deb http://ftp6.sjtu.edu.cn/debian wheezy main non-free contrib
deb http://ftp6.sjtu.edu.cn/debian wheezy-proposed-updates main non-free contrib
deb http://ftp6.sjtu.edu.cn/debian-security wheezy/updates main non-free contrib
deb-src http://ftp6.sjtu.edu.cn/debian wheezy main non-free contrib
deb-src http://ftp6.sjtu.edu.cn/debian wheezy-proposed-updates main non-free contrib
deb-src http://ftp6.sjtu.edu.cn/debian-security wheezy/updates main non-free contrib
#網易
deb http://mirrors.163.com/debian/ wheezy main non-free contrib
deb http://mirrors.163.com/debian/ wheezy-proposed-updates main non-free contrib
deb-src http://mirrors.163.com/debian/ wheezy main non-free contrib
deb-src http://mirrors.163.com/debian/ wheezy-proposed-updates main non-free contrib
#搜狐
deb http://mirrors.sohu.com/debian/ wheezy main non-free contrib
deb http://mirrors.sohu.com/debian/ wheezy-proposed-updates main non-free contrib
deb-src http://mirrors.sohu.com/debian/ wheezy main non-free contrib
deb-src http://mirrors.sohu.com/debian/ wheezy-proposed-updates main non-free contrib
#中國科技大學
deb http://mirrors.ustc.edu.cn/debian/ wheezy main non-free contrib
deb http://mirrors.ustc.edu.cn/debian/ wheezy-proposed-updates main non-free contrib
deb-src http://mirrors.ustc.edu.cn/debian/ wheezy main non-free contrib
deb-src http://mirrors.ustc.edu.cn/debian/ wheezy-proposed-updates main non-free contrib
#清華大學 不是很穩定
deb http://mirrors.tuna.tsinghua.edu.cn/debian/ wheezy main non-free contrib
deb http://mirrors.tuna.tsinghua.edu.cn/ wheezy-proposed-updates main non-free contrib
deb-src http://mirrors.tuna.tsinghua.edu.cn/ wheezy main non-free contrib
deb-src http://mirrors.tuna.tsinghua.edu.cn/ wheezy-proposed-updates main non-free contrib
#北京理工
deb http://mirrors.bit.edu.cn/debian/ wheezy main non-free contrib
deb http://mirrors.bit.edu.cn/ wheezy-proposed-updates main non-free contrib
deb-src http://mirrors.bit.edu.cn/ wheezy main non-free contrib
deb-src http://mirrors.bit.edu.cn/ wheezy-proposed-updates main non-free contrib
#北京理工(Ipv6)
deb http://mirrors.bit6.edu.cn/debian/ wheezy main non-free contrib
deb http://mirrors.bit6.edu.cn/ wheezy-proposed-updates main non-free contrib
deb-src http://mirrors.bit6.edu.cn/ wheezy main non-free contrib
deb-src http://mirrors.bit6.edu.cn/ wheezy-proposed-updates main non-free contrib
#清華大學(Ipv6)
deb http://mirrors.6.tuna.tsinghua.edu.cn/debian/ wheezy main non-free contrib
deb http://mirrors.6.tuna.tsinghua.edu.cn/ wheezy-proposed-updates main non-free contrib
deb-src http://mirrors.6.tuna.tsinghua.edu.cn/ wheezy main non-free contrib
deb-src http://mirrors.6.tuna.tsinghua.edu.cn/ wheezy-proposed-updates main non-free contrib
但有時候163的源會非常慢,只有幾KB每秒,因此我們需要更新源,這時候推薦使用新得力軟件包里的軟件源設置,讓其自己選擇最佳服務器,這樣可以自己替換掉sources.list文件中的內容,通常這樣比較管用。
3.安裝chromium瀏覽器
1 apt-get update 2 apt-get install chromium chromium-l10n
4.安裝flash
安裝flashplugins
下載http://get.adobe.com/flashplayer,選擇.tar.gz包。
1 tar xvf install_flash_player_11_linux.i386.tar.gz 2 cp –rv usr /usr 3 mkdir –v /usr/lib/iceweasel/plugins 4 cp libflashplayer.so /usr/lib/iceweasel/plugins 5 cp libflashplayer.so /usr/lib/chromium/plugins
5.輸入法
自帶的fcitx怎么也不能使用,網上Google了很多方法都沒用,所以干脆purge掉fcitx,重新安裝ibus
1 apt-get install ibus 2 apt-get install ibus-googlepinyin
啟用ibus輸入法。
在ibus中添加googlepinyin。
后來又把fcitx輸入法重新配置好了,要先安裝顯卡驅動再安裝輸入法前端,否則會出錯,要先把輸入法里的五筆等其他除了Google拼音之類的輸入法都刪掉
然后安裝前端:apt-get install fcitx-ui-classic
接着在輸入法設置里設置fcitx為默認輸入法即可。
或者直接重裝:
apt-get install ttf-wqy-microhei ttf-wqy-zenhei #安裝字體
apt-get install fcitx fcitx-pinyin fcitx-module-cloudpinyin fcitx-googlepinyin im-switch #fcitx拼音
安裝完畢后使用:im-switch -s fcitx或者使用輸入法配置的圖形界面將fcitx設置為默認輸入法
6.安裝編程工具
jdk:http://blog.csdn.net/liu_yongyou/article/details/9027381
eclipse:http://www.rockbb.com/blog/?p=349
python:http://blog626.blog.163.com/blog/static/1056107322013871337910/
codeblocks:http://www.cnblogs.com/maowang1991/p/3361640.html
kdevelop:
apt-get install build-essential cmake curl git vim
apt-get install kdevelop
apt-get install kdevelop-dbg kdevelop-dev kdevelop-l10n kdevelop-pg-qt
virtualbox:
http://www.rockbb.com/blog/?p=359
https://www.virtualbox.org/wiki/Linux_Downloads
git:
http://blog.csdn.net/ididcan/article/details/6646069
http://www.linuxidc.com/Linux/2012-06/62794.htm
vim:
https://github.com/fisadev/fisa-vim-config
https://github.com/humiaozuzu/dot-vimrc
https://github.com/square/maximum-awesome
推薦: https://github.com/spf13/spf13-vim
zsh:https://github.com/robbyrussell/oh-my-zsh
7.壓縮解壓縮命令
參考此帖:http://blog.csdn.net/zad522/article/details/2770446
8.網絡和時間配置
時間可以使用date配置:date -s xx:xx:xx可以設置時間,date -s 06/10/13可以設置日期,date -s "06/10/1996 13:12:00"可以設置日期和時間,設置完后右下角時間就能正確顯示了。
網絡配置參考此帖:http://www.cnblogs.com/BigIdiot/archive/2012/05/21/2511821.html
9.AMD顯卡驅動安裝問題
因為我的機器是雙顯卡,安裝完debian7后只能識別集成顯卡,而AMD的HD 7679顯卡無法識別,需要安裝驅動(在kde桌面下使用lspci | grep VGA 竟然可以識別AMD顯卡,但是還是無法運行,只能識別而已,所有還是需要安裝驅動發揮性能),具體步驟如下:
首先打開 http://support.amd.com/ 在這里選擇相應的顯卡型號然后下載下來是一個.zip文件,解壓縮后得到一個.run文件。
然后在bash下進入.run文件的目錄,執行如下命令:chmod 777 xxx.run,更改其執行權限。
接着輸入命令:./amd-driver.run 通常來說,這一步安裝是會出錯的,會有一個對話框提示”one or more tools required cannot be found in this system”,打開記錄文件你會發現這么一行:fglrx installation requires that the system have kernel headers系統缺少內核頭文件。
在bash下執行以下命令:sudo apt-get install build-essential linux-headers-$(uname -r) module-assistant然后安裝就能順利完成了,接下來重啟就能看到催化劑驅動的效果了。
升級完debian后如果出現無法啟動圖形界面的情況:
首先執行dpkg--reconfigure xserver-xorg,發現還是進不了,嘗試刪除/etc/X11/xorg.conf,進圖形界面卡在啟動畫面就停住了,ctrl alt f1啟動tty1,卸載ati顯卡驅動cd /usr/share/ati 運行sh ./fglrx-uninstall.sh 即可,接着重裝顯卡驅動就可以了。
安裝完畢重啟后可以使用命令:fglrxinfo查看顯卡信息,出現AMD或者ATI字樣就說明安裝驅動成功,然后使用命令:aticonfig --pxl來查看正在運行的顯卡模式,aticonfig --px-dgpu切換到獨立顯卡,aticonfig --px-igpu切換到獨立顯卡。
如果是nvidia驅動,卸載命令:nvidia-installer --uninstall,安裝類似於ati顯卡驅動的安裝。至於雙顯卡切換或者顯卡測試命令,因為我的機器是ati和intel雙顯卡,故沒有多做研究,或許以后換筆記本了會去研究哈=.=
10.修改gnome-shell.css
gedit /usr/share/gnome-shell/theme/gnome-shell.css
具體修改參數如下:
狀態欄字體大小
stage { font-family: cantarell, sans-serif; font-size: 9.5pt; //這里改成9.5pt覺得比較合適 color: white; }
彈出菜單透明
.popup-menu-boxpointer { -arrow-border-radius: 8px; /*-arrow-background-color: black;*/ //這是系統原來默認的黑色,為了安全起見,我只是將原來的注釋掉了 -arrow-background-color: rgba(0, 0, 0, 0.8); //改成0.8就好,不要太過透明,否則字就看不清 -arrow-border-width: 2px; -arrow-border-color: #a5a5a5; -arrow-base: 24px; -arrow-rise: 11px; }
面板透明
#panel { /*background-color: black;*/ //同樣,為了安全將原來的代碼注釋掉 background-color: rgba(0, 0, 0, 0.4); //將透明度調到0.4,可以根據自己的喜好調整 font-weight: bold; height: 1.86em; }
兩邊弧度變小:
.panel-corner {
-panel-corner-radius: 5px;
-panel-corner-background-color: black;
-panel-corner-border-width: 2px;
-panel-corner-border-color: transparent;
}
.panel-corner:active,
.panel-corner:overview,
.panel-corner:focus {
-panel-corner-border-color: rgba(255,255,255,0.8);
}
修改應用程序圖標的大小
.icon-grid {
/* old settings,edit by zws 2013.04.09
spacing: 36px;
-shell-grid-horizontal-item-size: 118px;
-shell-grid-vertical-item-size: 118px;
*/
spacing: 18px;
-shell-grid-horizontal-item-size: 96px;
-shell-grid-vertical-item-size: 96px;
}
.icon-grid .overview-icon {
/* icon-size: 96px;*/
icon-size: 64px;
}
面板彈出菜單大小修改
.popup-menu {
min-width: 100px;
}
11.使用KDE桌面版的CD鏡像安裝完系統后出現的問題進行總結
首先是中文字體亂碼問題:
解決方法如下:
1 dpkg-reconfigure locales
1 fc-cache -fv
alsactl init
再重啟一下就有聲音了。
最后是網絡連接問題:
KDE桌面右下角沒有網絡管理器,無法連接無線網,可以參考下列教程安裝NetworkManager即可解決
https://wiki.debian.org/zh_CN/NetworkManager
還有關於libreoffice以及kde桌面漢化問題:
libreoffice漢化:apt-get install libreoffice-l10n-zh-cn
kde桌面漢化:apt-get install kde-l10n-zhcn
還有一些關於kali linux的配置,參考下文:
http://xiao106347.blog.163.com/blog/static/215992078201342410347137/
12.關於xfce桌面配置問題
xfce桌面有些應用程序沒有安裝中文語言包,可以使用aptitude search xxx-l10 來查找中文語言包,然后安裝,例如可以安裝iceweasel中文語言包:apt-get install iceweasel-l10n-zh-cn,安裝libreoffice語言包:apt-get install libreoffice-l10n-zh-cn。
xfce桌面右下角時間設置問題:可以使用date命令的-s選項來設置時間。參考前面提到的時間設置方法,貌似orage日歷選項不是很好用,反正我最后使用date命令設置時間成功。
xfce快捷鍵設置:xfce下沒有鎖屏快捷鍵,沒有終端快捷鍵,所以需要自己設置,在鍵盤管理選項中選擇快捷鍵管理,可以去設置,常用命令有:鎖屏:xflock4,瀏覽器:iceweasel,終端:xfce4-terminal,運行程序:xfrun4,在添加完命令后可以按下快捷鍵來設置對應命令的快捷鍵了。
大致就是這么多,希望能對大家有所幫助啊!
