更新时间:2022-11-02 GMT+08:00
分享

安装基础组件包(可选)

操作场景

仅Debian系列操作系统需要执行此步骤,其他操作系统请跳过此步骤。安装的基础组件包包括vim软件、dkms包、linux--headers-xxx-common和linux-headers-xxx-amd64包。

操作步骤

  1. 安装vim软件。
    1. 配置apt源。

      执行vi /etc/apt/sources.list命令,添加apt源。不同版本的Debian操作系统所添加的内容不一样,以下文本以Debian 8.6为例。

      deb http://mirrors.ustc.edu.cn/debian jessie main contrib non-free
      deb-src http://mirrors.ustc.edu.cn/debian jessie main contrib non-free
      deb http://mirrors.ustc.edu.cn/debian jessie-proposed-updates main contrib non-free
      deb-src http://mirrors.ustc.edu.cn/debian jessie-proposed-updates main contrib non-free
      deb http://mirrors.ustc.edu.cn/debian jessie-updates main contrib non-free
      deb-src http://mirrors.ustc.edu.cn/debian jessie-updates main contrib non-free

      输入:wq!保存文件,然后执行apt update命令。

    2. 执行apt-get install vim安装vim软件。
  2. 执行apt-get install dkms安装dkms包。
  3. 执行apt-get install linux--headers-xxx-common安装linux--headers-xxx-common包。

    xxx代表具体内核版本号,如Debain 8.6的内核版本为3.16.0-4,请执行apt-get install linux--headers-3.16.0-4-common

  4. 执行apt-get install linux-headers-xxx-amd64安装linux-headers-xxx-amd64包。

    xxx代表具体内核版本号,如Debain 8.6的内核版本为3.16.0-4,请执行apt-get install linux-headers-3.16.0-4-amd64

  5. 删除“/etc/network/interfaces”文件的配置项。

    执行命令vi /etc/network/interfaces,如果存在eth0的配置,删除最后两行配置项。

    ...
    # The loopback network interface
    auto lo
    iface lo inet loopback
    
    # The primary network interface
    # 以下为需要删除的配置项:
    allow-hotplug eth0
    iface eth0 inet dhcp

    输入:wq!保存文件。

分享:

    相关文档

    相关产品