Chinaunix首页 | 论坛 | 博客

apt

  • 博客访问: 380303
  • 博文数量: 121
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 600
  • 用 户 组: 普通用户
  • 注册时间: 2015-04-10 15:52
文章分类

全部博文(121)

文章存档

2017年(2)

2016年(23)

2015年(96)

我的朋友

分类: LINUX

2015-06-02 13:48:13

1、debian安装:

1、debian安装我下载的是DVD桌面版,共3.7G,虽然比较大,但是还是有很多软件包遗漏。刚开始是通过U盘启动盘,制作使用的是:制作启动盘使用,在windows下,虽然速度比较慢,但是制作的启动盘确实能用。但是由于在debian系统刚安装完时只能从光盘中更新镜像,不能从网上更新,找源的时候也不能找到正确的,比如GCC、build-essential等不能正确安装,所以这种方式没有用。
所以刻录的光盘。
2、使用UtraIOS刻录光盘后,安装时选择自动分配分区、不扫描其他CD、不使用网络镜像、不参加調查、选择GNOME桌面。等待完成。

2、配置:

1、安装完后,需要添加CDROM的源:如果添加cdrom源,那么在插入光盘后,在新立得软件包管理器中,编辑——添加CD-ROM,或者运行如下命令:# apt-cdrom add。
2、但是只有这个软件源安装输入法会出问题,需要添加其他软件源,下面是我在其他网站找到的可以用的软件源:
    

点击(此处)折叠或打开

  1. deb http://mirrors.163.com/debian jessie main non-free contrib
  2. deb http://mirrors.163.com/debian jessie-proposed-updates main contrib non-free
  3. deb http://mirrors.163.com/debian-security jessie/updates main contrib non-free #deb-src http://mirrors.163.com/debian jessie main non-free contrib
  4. #deb-src http://mirrors.163.com/debian jessie-proposed-updates main contrib non-free
  5. #deb-src http://mirrors.163.com/debian-security jessie/updates main contrib non-free
  6. #deb http://http.us.debian.org/debian jessie main contrib non-free
  7. #deb http://non-us.debian.org/debian-non-US jessie/non-US main contrib non-free
  8. #deb http://security.debian.org jessie/updates main contrib non-free


在/etc/apt/sources.list中添加上面源,在新立得软件包管理器点击“刷新”,也可以按照如下命令:
# apt-get update  或 

# aptitide update
下面软件源没试过:

点击(此处)折叠或打开

  1. su -
  2. 密码:
  3. gedit /etc/apt/sources.list

  4. 添加以下163源:
  5. #####################主要,开源,闭源
  6. deb http://mirrors.163.com/debian wheezy main non-free contrib
  7. deb-src http://mirrors.163.com/debian wheezy main non-free contrib

  8. ###################wheezy-proposed-updates建议更新
  9. deb http://mirrors.163.com/debian wheezy-proposed-updates main contrib non-free
  10. deb-src http://mirrors.163.com/debian wheezy-proposed-updates main contrib non-free

  11. #wheezy-updates推荐更新
  12. deb http://mirrors.163.com/debian wheezy-updates main contrib non-free
  13. deb-src http://mirrors.163.com/debian wheezy-updates main contrib non-free


  14. #wheezy/updates安全更新
  15. deb http://mirrors.163.com/debian-security wheezy/updates main contrib non-free
  16. deb-src http://mirrors.163.com/debian-security wheezy/updates main contrib non-free

  17. deb http://http.us.debian.org/debian wheezy main contrib non-free
  18. deb http://security.debian.org wheezy/updates main contrib non-free


  19. #上海交大
  20. deb http://ftp.sjtu.edu.cn/debian wheezy main non-free contrib
  21. deb http://ftp.sjtu.edu.cn/debian wheezy-proposed-updates main non-free contrib
  22. deb http://ftp.sjtu.edu.cn/debian-security wheezy/updates main non-free contrib
  23. deb-src http://ftp.sjtu.edu.cn/debian wheezy main non-free contrib
  24. deb-src http://ftp.sjtu.edu.cn/debian wheezy-proposed-updates main non-free contrib
  25. deb-src http://ftp.sjtu.edu.cn/debian-security wheezy/updates main non-free contrib

  26. #上海交大 ipv6
  27. deb http://ftp6.sjtu.edu.cn/debian wheezy main non-free contrib
  28. deb http://ftp6.sjtu.edu.cn/debian wheezy-proposed-updates main non-free contrib
  29. deb http://ftp6.sjtu.edu.cn/debian-security wheezy/updates main non-free contrib
  30. deb-src http://ftp6.sjtu.edu.cn/debian wheezy main non-free contrib
  31. deb-src http://ftp6.sjtu.edu.cn/debian wheezy-proposed-updates main non-free contrib
  32. deb-src http://ftp6.sjtu.edu.cn/debian-security wheezy/updates main non-free contrib

  33. #网易
  34. deb http://mirrors.163.com/debian/ wheezy main non-free contrib
  35. deb http://mirrors.163.com/debian/ wheezy-proposed-updates main non-free contrib
  36. deb-src http://mirrors.163.com/debian/ wheezy main non-free contrib
  37. deb-src http://mirrors.163.com/debian/ wheezy-proposed-updates main non-free contrib

  38. #搜狐
  39. deb http://mirrors.sohu.com/debian/ wheezy main non-free contrib
  40. deb http://mirrors.sohu.com/debian/ wheezy-proposed-updates main non-free contrib
  41. deb-src http://mirrors.sohu.com/debian/ wheezy main non-free contrib
  42. deb-src http://mirrors.sohu.com/debian/ wheezy-proposed-updates main non-free contrib

  43. #中国科技大学
  44. deb http://mirrors.ustc.edu.cn/debian/ wheezy main non-free contrib
  45. deb http://mirrors.ustc.edu.cn/debian/ wheezy-proposed-updates main non-free contrib
  46. deb-src http://mirrors.ustc.edu.cn/debian/ wheezy main non-free contrib
  47. deb-src http://mirrors.ustc.edu.cn/debian/ wheezy-proposed-updates main non-free contrib

  48. #清华大学 不是很稳定
  49. deb http://mirrors.tuna.tsinghua.edu.cn/debian/ wheezy main non-free contrib
  50. deb http://mirrors.tuna.tsinghua.edu.cn/ wheezy-proposed-updates main non-free contrib
  51. deb-src http://mirrors.tuna.tsinghua.edu.cn/ wheezy main non-free contrib
  52. deb-src http://mirrors.tuna.tsinghua.edu.cn/ wheezy-proposed-updates main non-free contrib

  53. #北京理工
  54. deb http://mirrors.bit.edu.cn/debian/ wheezy main non-free contrib
  55. deb http://mirrors.bit.edu.cn/ wheezy-proposed-updates main non-free contrib
  56. deb-src http://mirrors.bit.edu.cn/ wheezy main non-free contrib
  57. deb-src http://mirrors.bit.edu.cn/ wheezy-proposed-updates main non-free contrib

  58. #北京理工(Ipv6)
  59. deb http://mirrors.bit6.edu.cn/debian/ wheezy main non-free contrib
  60. deb http://mirrors.bit6.edu.cn/ wheezy-proposed-updates main non-free contrib
  61. deb-src http://mirrors.bit6.edu.cn/ wheezy main non-free contrib
  62. deb-src http://mirrors.bit6.edu.cn/ wheezy-proposed-updates main non-free contrib

  63. #清华大学(Ipv6)
  64. deb http://mirrors.6.tuna.tsinghua.edu.cn/debian/ wheezy main non-free contrib
  65. deb http://mirrors.6.tuna.tsinghua.edu.cn/ wheezy-proposed-updates main non-free contrib
  66. deb-src http://mirrors.6.tuna.tsinghua.edu.cn/ wheezy main non-free contrib
  67. deb-src http://mirrors.6.tuna.tsinghua.edu.cn/ wheezy-proposed-updates main non-free contrib
现在软件源设置好后就可以安装软件。


3、安装软件

1、sudo:安装完debian后,默认没有sudo命令,所以还是需要添加命令。
su命令进入超级用户;apt-get install sudo;会在etc目录下增加sudoers文件,打来文件,假设用户名是“wintec",则添加
wintec    ALL =(ALL:ALL) ALL。现在sudo就可以使用了。
2、gcc:安装完debian,默认没有GCC,如果不使用CDROM,在安装时就会找不到合适的源或者版本,比较费劲,所以在设置cdrom后,在新立得软件管理软件中搜索build-essential,将要安装的软件标记后安装,就可以将该软件和gcc同时安装上。安装完后使用命令# gcc -v就可以查看gcc版本。
3、输入法:在debian刚安装后,输入法默认使用fcitx,但是安装并不完整,而且中文输入法根本不能用。在新立得软件中搜索fcitx,将所有的搜索结果安装后,#fcitx就可以启动软件。如果想后台,#fcitx &。但是现在不能显示输入法界面,可以输入汉字,但是不能选择汉字,是因为缺少fcitx-ui-classic,这个软件是在上面网络更新源中,在光盘中没有,在新立得软件中搜索该软件包,将搜索的结果安装上。重新启动就可以使用软件。


4、其他:

1、在这个安装过程中,也学到了其他东西。比如aptitude指令,使用"aptitude install 软件名称" ,系统会尽量解决安装源的问题,如果满意就Y,不满意就N。
2、http://my.oschina.net/qxa1982/blog/215587中有一些软件的安装方法,学习一下。
阅读(1362) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~