zoukankan      html  css  js  c++  java
  • Debian 安装配置(包括kdevelop)

    最近几天折腾了一下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- 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- 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- 100px;
    }

    11.使用KDE桌面版的CD镜像安装完系统后出现的问题进行总结

    首先是中文字体乱码问题:

    解决方法如下:

    1、安装字体:将Windows下字体拷入下/usr/share/fonts/truetype下
    2、debian下运行:
    1 dpkg-reconfigure locales
    a)将zh-CN 和 en-US开头的支持语音选项选中,点击OK
    b)默认语言选择zh-CN.UTF-8, 点击OK
    c)运行完该命令后,运行locale 查看当前语言是否是
    LANG=zh-CN.UTF-8
     
    查看已安装字体:fc-list :lang=zh
     
    3、重启即可
    如果不行重新建立字体缓存:
    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,在添加完命令后可以按下快捷键来设置对应命令的快捷键了。

    大致就是这么多,希望能对大家有所帮助啊!

  • 相关阅读:
    微信小程序 数组索引 data-“”解释
    Aho-Corasick算法原理(图省事我直接粘贴PPT了)
    神奇的人生
    nginx-学习笔记9
    nginx-学习笔记8
    nginx-学习笔记7
    nginx-学习笔记6
    nginx-学习笔记5
    nginx-学习笔记4
    nginx-学习笔记2
  • 原文地址:https://www.cnblogs.com/lvchaoshun/p/7222930.html
Copyright © 2011-2022 走看看