操作系统:centos7 得到DVWA链接地址: 去官网(https://dvwa.co.uk/):  复制后的链接例如:https://github.com/digininja/DVWA/archive/master.zip
yum install php php-mysqlnd php-gd httpd mariadb mariadb-server unzip -y systemctl start httpd systemctl start mariadb firewall-cmd --permanent --zone=public --add-port=80/tcp firewall-cmd --reload
cd /var/www/html/ wget https://github.com/digininja/DVWA/archive/master.zip 解压缩:unzip master.zip  配置数据库 mysqladmin -u root password ‘1234567@a’ 登录数据库: mysql -u root -p  退出数据库exit或quit 更改文件属组: chown -R apache:apache /var/www/html/*
改一下DVWA的配置:(只修改下图的用户和密码,改成下图) vim /var/www/html/DVWA-master/config/config.inc.php   这两项上网搜一下能搜到公私钥,也可以在线生成(https://www.google.com/recaptcha/admin/create) 看这篇文章:DVWA reCAPTCHA key: Missing解决方法.
把key填上就行了
$_DVWA[ 'recaptcha_public_key' ] = '6LdJJlUUAAAAAH1Q6cTpZRQ2Ah8VpyzhnffD0mBb';
$_DVWA[ 'recaptcha_private_key' ] = '6LdJJlUUAAAAAM2a3HrgzLczqdYp4g05EqDs-W4K';
改SELinux配置:(报错参考:https://ask.csdn.net/questions/971437) setsebool -P httpd_can_network_connect_db 1
改一下php的配置:(改成下图) vim /etc/php.ini  然后重启httpd:systemctl restart httpd
访问网址查看DVWA设置: 。。。/DVWA-master/setup.php
点击页面下面的按钮:  登录: admin ? password 
登录成功:  完。
|