前言

最近准备学渗透测试(其实是想学怎么黑垃圾网站),看了许多教程都是用的Kali Linux,所以准备先装个环境先。想起DigitalOcean还有多余的额度,已经吃灰好久的服务器终于派上用场了。

官方也有教程,看这两个足矣:

  1. 在DigitalOcean上使用自定义镜像:https://docs.digitalocean.com/products/images/custom-images/
  2. 在DigitalOcean上使用kali:https://www.kali.org/docs/cloud/digitalocean/#install-required-packages

其实直接上传官方的VM文件然后安装也可以,但kali官方也说了:

By default, the Kali Linux ISOs on the download page have a desktop environment installed, and while we could use it to build a virtual machine, we want to minimize the amount of data we have to upload to DigitalOcean for reasons we will talk about later. Having a GUI running on a headless system is also a waste of resources so while we could uninstall it or disable it, we’ll install the virtual machine using a netboot ISO. If you are comfortable with a text installation, grab the mini.iso in this directory. If not, head to the gtk/ directory and grab the mini.iso in there, which will start a graphical installer.

意思是我们大可不必安装桌面环境,可以用它提供的netboot镜像安装更简约的系统。但这个坑爹的地方是,DigitalOcean不支持iso安装,需要我们新建一个虚拟机,安装好之后,把虚拟机上传成自定义镜像。因为VMware是收费的,我也不想使用盗版,所以干脆使用VirtualBox了。

VirtualBox下载地址:https://www.virtualbox.org/wiki/Downloads

安装过程

1 新建虚拟机(本地)

在官方下载netboot镜像(mini.iso):http://http.kali.org/kali/dists/kali-rolling/main/installer-amd64/current/images/netboot/

在VirtualBox中新建虚拟机

镜像选择我们下载的mini.iso,Debian系统要改成64位的,我这个上面忘了修改了。