网络版最小化安装Debian后的配置

一直以来就钟情于debian系的系统,今天终于决定把开发平台转移到这上面来。网络版安装,连基本系统都没选,这是最简的了,不敢再追求完美了,还没有那个实力把LFS玩转起来。
    中间没啥大问题,笔记本的话可能会报找不到iwlwifi-3945-ucode,无线网卡的驱动,以后再解决它。
1.配置locales
#dpkg-reconfigure locales 
    en_US.UTF-8
    zh_CN.GB2312
    zh_CN.UTF-8
    zh_CN.GBK
默认en_US.UTF-8

2.挂载win分区,copy镜像文件
# mkdir -v /mnt/win 
# mount -t ntfs /dev/sda6 /mnt/win -o iocharset=utf8,umask=022 
# cd 相应directory 
# cp -v 相应iso文件 保存到相应的目录

3.将iso文件挂载到apt源
#apt-cdrom add (询问y or n,先别选看下一步)
Ctrl+Alt+F2(切换到tty2)
#mount -t iso9660 -o loop 相应的iso文件 /media/cdrom0(debian下 /cdrom -> /media/cdrom -> /media/cdrom0)
Ctrl+Alt+F1(切换到tty1)
选y完成将iso挂载到apt源,/etc/apt/sources.list多了一行。

4.安装pppoeconf
#apt-get install pppoeconf(若提示需挂载cdrom,则重复mount -t iso9660 -o loop 相应的iso文件 /media/cdrom0) 

5.联网前的准备(之后的一切将均有网络来完成,如果你是刻了lenny 的dvd,则不会这么复杂。)
#vi /etc/network/interfaces
下面是设置静态ip地址的例子
auto lo  
iface lo inet loop 
auto eth0 
iface eth0 inet static  
address 192.168.201.1 
netmask 255.255.255.0 
network 192.168.201.0 
broadcast 192.168.201.255 
gateway 192.168.2011.1 
mtu 1500
来一个从DHCP服务器自动获得ip地址的例子
auto lo 
iface lo inet loopback 
auto eth0 
iface eth0 inet dhcp 

6.配置联网
#pppoeconf 
设置完之后通过
#plog    或者 
#ping -c 3 www.google.cn查看网络是否连接成功 

7.通过apt-spy设置最快源
先设置一个权威的官方源列表(暂用,用于安装apt-spy)
#vi /etc/apt/sources.list 
添加 
deb http://http.us.debian.org/debian stable main contrib non-free 
deb-src http://http.us.debian.org/debian stable main contrib non-free
#apt-get update 
#apt-get install apt-spy 
#cp -v /etc/apt/sources.list /etc/apt/sources.list.bak备份源列表 
#apt-spy update 
#man apt-spy 查看apt-spy的用法 
#apt-spy -d testing -a asia
我这里是ftp://anheng.com.cn 最快,达到了我的峰值网速

8.设置sudo
#apt-get install sudo  
#chmod +w /etc/sudoers 
#cat "你要添加到sudo的用户 ALL=(ALL) ALL" >> /etc/sudoers 
#chmod 0440 /etc/sudoers

9. 安装X窗口
#apt-get install xorg
 

10. 安装gnome
#apt-get install gnome-core gdm

11. 安装gnome主题、图标、背景
#apt-get install gnome-themes gnome-icon-theme-dlg-neu gnome-backgrounds

12. 安装gnome下的声音支持。
#apt-get install gnome-audio esound #esound是gnome下的软件混音器

13. 其他工具
#apt-get install gnome-system-tools gconf-editor nautilus-open-terminal
gnome-system-tools 服务、网络等系统工具
gconf-editor 配置编辑器
nautilus-open-terminal 在右键菜单中加入终端

14.装完x及gnome之后,我选择了装显卡驱动,毕竟这也是一劳永逸的事。
到这个页面选择适合你的显卡http://www.nvidia.com/Download/index.aspx?lang=en-us
以root登录 sudo su root

  1. #apt-get install build-essential linux-headers-$(uname -r)  
  2. #cd /usr/src  
  3. #mv -v 你下载的显卡驱动 .  
  4. #ln -s linux-headers-$(uname -r) linux  
  5. #/etc/init.d/gdm stop   停止gdm到终端  
  6. #cd /usr/src && sh NVIDIA驱动

 

a.“接受”许可协议,继续,b.对第一个问题选择"否",即不从Nvidia网站下载内核,c.单击确定以编译新内核

d.选择"否",即不从安装程序中退出.现在 ,让安装程序完成安装 e.最后选择"是",让NVIDIA产品xconfig自动更新您的xorg.conf文件 ,至此已完成NVIDIA显卡驱动安装。
第7步键入startx,重新启动x windows,然后浏览到“管理” - > NVIDIA X Server Settings,找到一项把目前的设置写入到xorg.conf文件,选择“是” . 重启机器可以以普通用户登录 和享受您的启用Lenny与NVIDIA驱动程序新视频硬件 ,您也可以随时通过漂亮的NVIDIA X服务器设置控制程序更改您的的视频卡设置。只要浏览到应用程序> “系统工具” - > NVIDIA X Server Settings。
注:特别注意最后一步是一 定要做的,要不然会出现进入不到x windows的情况。

15. 安装OpenOffice.org

  1. #apt-get install openoffice.org-writer openoffice.org-calc openoffice.org-math openoffice.org-impress openoffice.org-gtk openoffice.org-help-en-us  
  2. #apt-get install openoffice.org-l10n-zh-cn openoffice.org-help-zh-cn #中文界面和中文帮助 

16. 编程环境支持

  1. #apt-get install build-essential libgtk2.0-dev freeglut3-dev libtool autoconf automake subversion

17. 安装中文字体

  1. #apt-get install xfonts-wqy ttf-arphic-uming ttf-freefont 

18. 压缩与解压缩

  1. #apt-get install file-roller p7zip-full cabextract 

19. 安装视频播放器
#apt-get install mplayer
20. PDF阅读
#apt-get install evince
21. 图像处理
#apt-get install gimp
22. 网络通讯
#apt-get install pidgin
23.安装中文输入法
#apt-get install scim scim-pinyin scim-tables-zh im-switch
$im-switch -z en_US -s scim #英文系统下使用SCIM:
光标跟随

  1. #vi /etc/X11/xinit/xinput.d/scim  
  2. #GTK_IM_MODULE=xim  将这两行改为最下面的两行  
  3. #QT_IM_MODULE=xim  
  4. GTK_IM_MODULE=scim   
  5. QT_IM_MODULE=scim

24.添加软件源

  1. #vi /etc/apt/sources.list.d/apt-spy.list  
  2. 加入下面的两行  
  3. deb http://www.debian-multimedia.org/ lenny main  
  4. deb-src http://www.debian-multimedia.org/ lenny main 

 

安装该软件源的KEY,这是一个通用做法。

su root这一步一定要做

执行#apt-get update让其提示错误

W: GPG error: http://www.debian-multimedia.org testing Release: 由于没有公钥,下列签名无法进行验证: NO_PUBKEY 07DC563D1F41B907
文章出处:http://www.diybl.com/course/6_system/linux/Linuxjs/200863/120839.html

#gpg --keyserver wwwkeys.eu.pgp.net --recv-keys 提示所缺少的那个公钥,这里是07DC563D1F41B907

执行之后显示如下,从下面可以得到公钥串,便是下面的1F41B907.

gpg: requesting key 1F41B907 from hkp server wwwkeys.eu.pgp.net
gpg: key 1F41B907: "Christian Marillat <marillat@debian.org >" 1 new signature
gpg: key 1F41B907: "Christian Marillat <marillat@debian.org >" 1 new subkey
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg:            new subkeys: 1
gpg:         new signatures: 1
#gpg --armor --export 公钥串,这里是1F41B907 | apt-key add -
也可以直接安装
#wget http://www.debian-multimedia.org/pool/main/d/debian-multimedia-keyring/debian-multimedia-keyring_2008.10.16_all.deb && dpkg -i debian-multimedia-keyring_2008.10.16_all.deb
25.更新系统

  1. #apt-get update  
  2. #apt-get upgrade

26. 安装视频解码包
#apt-get install w32codecs
27. Evince完美中文支持
#apt-get install xpdf-chinese-simplified xpdf-chinese-traditional
28. CHM文件支持
#apt-get install chmsee
30. 安装文泉驿正黑字体
#apt-get install ttf-wqy-zenhei
31.安装浏览器,Debian下没有firefox(版权问题),对应的是iceweasel,就像centos与rhel的关系一样。
$sudo apt-get install iceweasel iceweasel-l10n-zh-cn

flashplayer的插件安装

下载install_flash_player_10_linux.tar.gz

 

  1. #tar -xzf install_flash_player_10_linux.tar.gz  
  2. #cd install_flash_player_10_linux/  
  3. #mkdir -p ~/.mozilla/plugins/  
  4. #cp libflashplayer.so  ~/.mozilla/plugins/  
  5. #cp libflashplayer.so  /usr/lib/iceweasel/ 

32.安装vim & emacs
#apt-get install vim emacs

建立vim的配置文件

$vi ~/.vimr

  1. filetype on   
  2. syntax on   
  3. colorscheme blueprint  "这个配色不是默认带的,需要去下载,http://code.google.com/p/vimcolorschemetest/,并将其移到/usr/share/vim/vim72/colors/目录下  
  4. set title  
  5. set nocompatible  
  6. set number  
  7. set history=1000   
  8. set background=dark   
  9. set autoindent  
  10. set smartindent  
  11. set tabstop=4  
  12. set shiftwidth=4  
  13. set showmatch  
  14. set guioptions-=T  
  15. set vb t_vb=  
  16. set ruler  
  17. set nohls  
  18. set incsearch 

33.安装音乐播放器
$sudo apt-get install rhythmbox gstreamer0.10-ffmpeg

34.自动挂载windows分区

#vim /usr/sbin/autowinfs

 

  1. #!/bin/sh  
  2. #  
  3. #autowinfs     auto mount windows disks  
  4. #  
  5. # Copyright (c) 2005    Jiahua Huang <jhuangjiahua@gmail.com>  
  6. #License: GPLv2  
  7. #  
  8. #   /usr/bin/sutowinfs  
  9. #   用来自动挂载机器上的 Windows 分区 , 并写入 /etc/fstab  
  10. #    五   2月 18 14:06:12 CST 2005  
  11. mkdir   -p   /windows/  
  12. rmdir    /windows/*    1> /dev/null  
  13. grep   -v   '/windows/'   /etc/fstab   >   /etc/fstab.swp  
  14. #   本脚本用于 UTF-8 的 Locale 下   
  15. #   单独的 fdisk   -l   不能列出分区的情况很少了 , 所以把   /dev/[hs]d[a-z]   去掉  
  16. ## fdisk   -l   /dev/[hs]d[a-z]   |   grep    -E   'FAT|NTFS'   | cut -d' ' -f1     |    cut -d/ -f3   |    while read WDISKS  
  17. # 查找 NTFS 分区   , 新内核的 auto 好像有点问题 , 所以现在把   NTFS 和 VFST 分开来  
  18. fdisk   -l /dev/[hs]d[a-z]   |   grep      'NTFS'   | cut -d' ' -f1     |    cut -d/ -f3   |    while read WDISKS  
  19.       do echo   "/dev/$WDISKS   /windows/$WDISKS   ntfs   auto,user,nls=utf8,umask=0    0 0"     >>   /etc/fstab.swp  
  20.       mkdir   "/windows/$WDISKS"  
  21. done  
  22. fdisk   -l /dev/[hs]d[a-z]   |   grep      'FAT'   | cut -d' ' -f1     |    cut -d/ -f3   |    while read WDISKS  
  23.       do echo   "/dev/$WDISKS   /windows/$WDISKS   vfat   auto,user,utf8,umask=0    0 0"     >>   /etc/fstab.swp  
  24.       mkdir   "/windows/$WDISKS"  
  25. done  
  26. mv    /etc/fstab.swp     /etc/fstab  
  27. mount    -a  
  28. exit   0

$sudo cat  >> /etc/fstab <<eof

  1. /dev/sda1        /mnt/winc     ntfs     defaults,iocharset=utf8,umask=0222    0 0  
  2. /dev/sda5        /mnt/wind     ntfs     defaults,iocharset=utf8,umask=0222    0 0  
  3. /dev/sda6        /mnt/wine     ntfs     defaults,iocharset=utf8,umask=0222    0 0  
  4. /dev/sda7        /mnt/winf     ntfs     defaults,iocharset=utf8,umask=0222    0 0

 

$sudo chmod +x /usr/sbin/autowinfs

$sudo /usr/sbin/autowinfs     这个执行时实现自动挂载

  • 2
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值