# 1、直接使用docker搭建方便很多,这个环境依赖问题没必要多花时间去研究;
ubuntu安装docker
apt-get update
apt-get install apt-transport-https ca-certificates curl gnupg lsb-release
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
apt-get update
apt-get install docker-ce docker-ce-cli containerd.io
centos7安装docker
yum install -y yum-utils
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum install docker-ce docker-ce-cli containerd.io -y
安装dvwa靶机
docker run -itd --name dvwa -p 8071:80 sagikazarmark/dvwa
上面的8071可以自己定义,正常启动后直接浏览器访问部署机器的ip和端口
管理员账号和密码:
admin
password