安装Debian后的基本配置

说明

  • 描述:本文介绍了安装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
  • 0
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Debian 11是一款流行的开操作系统,下面是关于如何安装配置Debian 11的指南: 1. 下载Debian 11的安装镜像文件并刻录至启动盘或者使用虚拟机加载。 2. 插入启动盘或者启动虚拟机,并选择启动设备为安装镜像。 3. 进入Debian 11的安装界面后,选择语言和地区,并设置键盘布局。 4. 选择“安装”以开始安装过程。 5. 根据提示选择时区、设置主机名和域名。 6. 创建一个用于登录系统的用户帐户,设置密码。 7. 选择磁盘分区方式,你可以选择手动分区或者使用自动分区工具。 8. 等待系统安装完成后,重新启动计算机。 9. 安装完成后,使用上一步中创建的用户帐户登录系统。 至此,你已经完成了Debian 11的安装,接下来可以进行一些配置: 1. 更新软件包:使用命令`sudo apt update`和`sudo apt upgrade`更新系统上的软件包到最新版本。 2. 安装常用软件:根据你的需求,可以使用`sudo apt install`命令安装各种软件,如文本编辑器、浏览器等等。 3. 配置网络:可以使用Network Manager来配置网络连接,使用`nmtui`命令可以打开一个文本界面来配置网络连接。 4. 设置防火墙:Debian 11默认使用iptables防火墙,你可以使用`sudo ufw`命令来配置防火墙规则。 5. 安装其他软件:你可以根据需要添加其他软件,例如非自由软件,以便安装一些非免费软件。 6. 配置用户和权限:通过命令`sudo adduser`和`sudo usermod`可以添加、修改和管理用户,使用`sudo visudo`可以编辑sudoers文件来配置用户权限。 通过以上步骤,你可以完成Debian 11的安装基本配置。在日常使用中,你可以根据自己的需要继续进行其他的配置和优化。

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值