1、首先添加阿里源
l curl -O http://mirrors.aliyun.com/repo/Centos-7.repo
l curl -O http://mirrors.aliyun.com/repo/epel-7.repo
l curl -O http://mirrors.aliyun.com/repo/epel-testing.repo
2、重建yum源缓存
Yum clear all && yum makecache
3、更新yum包
Yum update -y
4、安装基本环境
yum install -y yum-utils device-mapper-persistent-data lvm2
5、使用阿里docker源
yum-config-manager –add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
6、重建缓存
Yun makecache fast
7、安装docker
Yum -y install docker-ce
8、查看docker系统版本,验证是否安装成功
docker version
9、添加开启自启动
Systemctl start docker
Systemctl enable docker
10、设置国内源加速,设置完成后重启docker
Systemctl daemon-reload
Systemctl restart docker
11、安装docker-compose以及加权限
curl -L https://get.daocloud.io/docker/compose/releases/download/1.25.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
12、安装vulhub靶场下载压缩包
https://vulhub.org/#/docs/download-vulhub/
13、把压缩包方在dio中
mkdir dio
14、解压压缩包
unzip 压缩包名
15、进入测试漏洞目录,开启靶机
Cd /dio/vulhub/httpd/CVE-2017-15715
16、安装环境,开启靶机
Docker-compose up -d