kali2.0安装DVWA(亲测有效)

1,去官网下载DVWA源文件:DVWA
2,解压文件:

unzip DVWA-master.zip

3,将其移动到/var/www/html文件下,并且重命名为dvwa(重命名纯属为了登陆方便)

mv  DVWA-master  /var/www/html 

4,修改文件夹权限:

chmod -R 755 dvwa

5,启动apache2 和mysql

service apache2 start
service apache2 status 查看启动是否成功

service mysql start
service mysql status 查看启动是否成功

6,创建数据库

root@kali:~# mysql     #输入mysql,开启MariaDB数据库
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 35
Server version: 10.1.35-MariaDB-1 Debian unstable

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> create database dvwa;   #创建数据库dvwa,完成后输入exit推出
MariaDB [(none)]> exit
Bye

7,创建用户dvwa

create user 'dvwa'@'localhost' identified by 'dvwa';
grant all on *.* to 'dvwa'@'localhost';
set password for 'dvwa'@'localhost' = password('dvwa');

8,修改dvwa中的配置文件

cd /var/www/html/dvwa/config/ #切换目录
mv config.inc.php.dist config.inc.php   #对该config文件中的此文件修改名称
vim /config.inc.php     #修改其配置信息,如下:
$_DVWA[ 'db_user' ] = 'dvwa';
$_DVWA[ 'db_password' ] = 'dvwa';
$_DVWA[ 'db_database' ] = 'dvwa';

9,在浏览器输入:http://localhost/dvwa或者http://127.0.0.1/dvwa即可登陆
10,使用默认账号:admin/password登陆

猜你喜欢

转载自blog.csdn.net/qq_39353923/article/details/82357185