在debain安裝DVWA


apt-get install apache2
apt-get install mysql-server
apt-get install php7.0
apt-get install php-mysql
apt-get install php-gd

rm /var/www/html/index.html

cd /var/www/html
去下載DVWA
unzip DVWA-master

cp -r DVWA-master DVWA #這部看你要不要做 只是把路徑縮短一點
cp /var/www/html/DVWA/config/config.inc.php.dist config.inc.php

vim config.inc.php
db_user 改user
db_password 改password

vim /etc/php/7.0/apache2/php.ini
找到以下兩個然後On
allow_url_include
allow_url_fopen

調整MYSQL

mysql -u root -p
create database dvwa;
CREATE USER 'user'@'127.0.0.1' IDENTIFIED BY 'password';
grant all on dvwa.* to 'user'@'127.0.0.1';
flush privileges;
exit

systemctl enable apache2 #開機啟動
systemctl restart apache2



防火牆
我是用firwalld啦 看你有沒有防火牆
<code class="prettyprint">
firewall-cmd --zone=public --add-port=80/tcp --permanent
firewall-cmd --zone=public --add-port=443/tcp --permanent
firewall-cmd --reload
</code>



留言

這個網誌中的熱門文章

centos7 架設 snort IDS (版本2.9.13)

在debian10 安裝 docker 以及 Logon Tracer