Ubuntu 上安装
本指南介绍如何使用 Ubuntu 原始 ISO 发行版在裸机上安装 EVE-NG。
获取最新的 Ubuntu 16.04.3 LTS ISO:
👉 https://www.ubuntu.com/download/server
从 ISO 创建可启动的安装介质(CD 或 USB),然后从它启动服务器。
Ubuntu 安装步骤
Section titled “Ubuntu 安装步骤”| 配置项 | 设置值 |
|---|---|
| 选项 | 安装 Ubuntu 服务器 |
| 语言 | 英语 |
| 位置 | 美国 |
| 配置键盘 | 否 |
| 键盘布局 | 英文(美国) |
| 网络配置 | DHCP 自动获取,或手动设置 IP/掩码/网关和 DNS |
| 主机名 | eve-ng |
| 域名 | eve-ng.cn(如果没有自己的域名) |
| 用户全名 | 用户(用于首次登录 Ubuntu) |
| 用户名 | user |
| 密码 | 自定义密码 |
| 使用弱密码 | 是 |
| 加密主目录 | 否 |
| 配置时钟 | 是(时区将自动设置) |
| 分区磁盘 | 使用整个磁盘并设置 LVM |
| 将更改写入磁盘并创建 LVM | 是 |
| 卷的数量 | 保持默认大小 |
| 强制 UEFI 安装 | 是 |
| HTTP 代理 | 无(如有需要请配置) |
| 自动更新 | 自动安装安全更新 |
| 软件选择 | 选择 OpenSSH Server(用空格标记) |
| 安装 GRUB 引导装载程序 | 是 |
安装 EVE-NG
Section titled “安装 EVE-NG”Ubuntu 服务器安装完成后,请按照以下步骤安装 EVE-NG。
-
以 root 用户身份登录
sudo su -
更改 root 密码
sudo passwd root示例输出:
输入新的 UNIX 密码:eve 重新输入新的 UNIX 密码:eve passwd:密码更新成功 -
安装 NANO 编辑器
apt-get install nano -
配置主机名
如果在安装过程中没有设置主机名,请按以下方式修改:
nano /etc/hostname内容设置为:
eve-ng编辑 hosts 文件:
nano /etc/hosts内容如下:
127.0.0.1 localhost 127.0.1.1 eve-ng.example.com eve-ng保存设置:
Ctrl + O,退出:Ctrl + X -
允许 root 用户 SSH 登录
nano /etc/ssh/sshd_config找到并修改:
- PermitRootLogin prohibit-password + PermitRootLogin yes -
重启 SSH 服务
保存设置(
Ctrl + O,Ctrl + X),然后重启 SSH:sudo service ssh restart -
更新 GRUB 配置
sed -i -e 's/GRUB_CMDLINE_LINUX_DEFAULT=.*/GRUB_CMDLINE_LINUX_DEFAULT="net.ifnames=0 noquiet"/' /etc/default/grub update-grub -
配置网络接口
将原始接口名称更改为
eth0:nano /etc/network/interfaces配置内容(DHCP 示例):
# 该文件描述了系统上可用的网络接口 # 以及如何激活它们。有关更多信息,请参阅 interfaces(5) # 环回网络接口 auto lo iface lo inet loopback # 主网口 auto eth0 iface eth0 inet dhcp可选:10Gb 接口支持
仅适用于 Broadcom NetXtreme II 10Gb 接口,常规服务器不需要:
apt-get install firmware-bnx2x -
保存并重启
保存设置(
Ctrl + O,Ctrl + X),然后重启:reboot -
下载 EVE-NG 密钥
wget -O - http://www.eve-ng.net/repo/eczema@ecze.com.gpg.key | sudo apt-key add - -
添加 EVE-NG 软件源
首先安装必要的依赖:
apt-get install python-software-properties apt-get install software-properties-common添加软件源:
apt-get update sudo add-apt-repository "deb [arch=amd64] http://www.eve-ng.net/repo xenial main" apt-get update -
安装 EVE-NG
DEBIAN_FRONTEND=noninteractive apt-get -y install eve-ng -
复制 Broadcom 固件
cp -rp /lib/firmware/$(uname -r)/bnx2 /lib/firmware/ -
完成设置向导
关闭当前会话,重新用 root 用户登录到 EVE-NG,然后按照设置向导完成配置:
-
更新和升级 EVE-NG
apt-get update apt-get upgrade
🎉 安装完成
Section titled “🎉 安装完成”恭喜!EVE-NG 已成功安装在您的 Ubuntu 服务器上。