说明
- 描述:本文介绍了安装Debian7.5发行版后的必要配置以便于更好的使用Debian进行软件开发。
- 镜像:本文基于已安装的 debian-live-7.5.0-amd64/i386-gnome-desktop.iso 中文版
- 假设:你的安装用户名是wpf
1. 修改/etc/sudoers,挂载,修改/etc/apt/source.list
添加wpf到sudoer
切换到root:
su root
用编辑器打开 /etc/sudoers
,在:
# User privilege specification
root ALL=(ALL:ALL) ALL
后面添加一行,添加后如下:
# User privilege specification
root ALL=(ALL:ALL) ALL
wpf ALL=(ALL:ALL) ALL
保存修改并推出root用户:
exit
开机自动挂在现有分区
修改/etc/fstab文件,添加如下一行:
# 设备节点 挂在目录 文件系统类型 参数 dump pass
/dev/YourNode /YourDir fstype defaults 0 0
解释:
- YourNode:你要挂在的设备节点,通常是sdb1或sdb2。
- YourDir:你想要将YourNode挂在到那个目录下,一般在自己的主目录下面新建一个文件目录。
- fstype:是你的YourNode文件系统的类型,一般是ext3/ext4/ntfs,分别对应的fstype为
ext3/ext4/ntfs-3g - 后面三项参数使用
defaults 0 0
即可。
更新软件源 /etc/apt/source.list
备份:
sudo cp /etc/apt/source.list /etc/apt/source.list-org
将 /etc/apt/source.list
内容替换为下面的内容:
Debian 7 wheezy
#
# Official mirror for wheezy
#
deb http://ftp.cn.debian.org/debian/ wheezy main contrib non-free
deb http://ftp.cn.debian.org/debian/ wheezy-backports main contrib non-free
deb http://ftp.cn.debian.org/debian/ wheezy-proposed-updates main contrib non-free
deb http://ftp.cn.debian.org/debian/ wheezy-updates main contrib non-free
deb-src http://ftp.cn.debian.org/debian/ wheezy main contrib non-free
deb-src http://ftp.cn.debian.org/debian/ wheezy-backports main contrib non-free
deb-src http://ftp.cn.debian.org/debian/ wheezy-proposed-updates main contrib non-free
deb-src http://ftp.cn.debian.org/debian/ wheezy-updates main contrib non-free
#
# http://debian.ustc.edu.cn/debian/ Zhong Ke Da for wheezy
#
deb http://debian.ustc.edu.cn/debian/ wheezy main contrib non-free
deb http://debian.ustc.edu.cn/debian/ wheezy-backports main contrib non-free
deb http://debian.ustc.edu.cn/debian/ wheezy-proposed-updates main contrib non-free
deb http://debian.ustc.edu.cn/debian/ wheezy-updates main contrib non-free
deb-src http://debian.ustc.edu.cn/debian/ wheezy main contrib non-free
deb-src http://debian.ustc.edu.cn/debian/ wheezy-backports main contrib non-free
deb-src http://debian.ustc.edu.cn/debian/ wheezy-proposed-updates main contrib non-free
deb-src http://debian.ustc.edu.cn/debian/ wheezy-updates main contrib no