您好,登錄后才能下訂單哦!
Centos7中怎么搭建一個dvwa攻防演練系統(tǒng),針對這個問題,這篇文章詳細(xì)介紹了相對應(yīng)的分析和解答,希望可以幫助更多想解決這個問題的小伙伴找到更簡單易行的方法。
[root@centos7 ~]# vim /etc/sysconfig/selinux
=后面改為disabled
:wq保存并退出
把機(jī)器重啟:[root@centos7 ~]# reboot
[root@centos7 ~]# yum -y install httpd php php-mysql php-gd mariadb-server [root@centos7 ~]# systemctl start httpd #啟動http 服務(wù)。 [root@centos7 ~]# systemctl enable httpd #設(shè)置 http 服務(wù)開機(jī)自啟。 [root@centos7 ~]# systemctl start mariadb #啟動 mariadb 服務(wù)。 [root@centos7 ~]# systemctl enable mariadb #設(shè)置 mariadb 服務(wù)開機(jī)自啟。 [root@centos7 ~]# systemctl disable firewalld && systemctl stop firewalld && systemctl status firewalld #關(guān)閉防火墻
[root@centos7 ~]# mysqladmin -u root password "123456"
驗(yàn)證一下能不能進(jìn)去:
[root@centos7 ~]# mysql -u root -p123456 MariaDB [(none)]> \q
解壓 DVWA-master.zip 程序包,并指定解壓后存放路徑為/var/www/html/
[root@centos7 ~]# unzip -d /var/www/html/ DVWA-master.zip [root@centos7 ~]# cd /var/www/html/ [root@centos7 ~]# mv DVWA-master dvwa #修改名稱 DVWA-master 為 dvwa [root@centos7 ~]# chown -R apache. /var/www/html/dvwa/ #修改文件主、組為 apache 用戶 [root@centos7 ~]# cd dvwa/config/
#切換到 dvwa/config/目錄下
復(fù)制 config.inc.php.dist 文件,并命令為 config.inc.php:
[root@centos7config]# cp config.inc.php.dist config.inc.php
[root@centos7config]# vim config.inc.php #編輯 config.inc.php 文件,修改如下:
修改第 21 行內(nèi)容,改成自己的 mysql 的 root 用戶密碼
$_DVWA[ 'db_password' ] = 'p@ssw0rd';
修改為:
$_DVWA[ 'db_password' ] = '123456';
(用戶也建議改成root)
修改第 29、30 行內(nèi)容:
$_DVWA[ 'recaptcha_public_key' ] = ''; $_DVWA[ 'recaptcha_private_key' ] = '';
添加上谷歌開源免費(fèi)驗(yàn)證碼 reCAPTCHA 的公鑰和私鑰
$_DVWA[ 'recaptcha_public_key' ] = '6LfUZr4UAAAAACs5S68EfL7A7WXjNHAqyWnZwIch'; $_DVWA[ 'recaptcha_private_key' ] = '6LfUZr4UAAAAACMgFi7Qh7yPvWLtq0LV_zIBYWa8';
[root@centos7config]# vim /etc/php.ini
末行模式下輸入:set nu顯示行數(shù),跳轉(zhuǎn)到815行(命令行模式按815,再按G就可以跳轉(zhuǎn)),修改文件中的第 815 行的內(nèi)容,原 Off,改為 On:
allow_url_include = Off
改為:
allow_url_include = On [root@centos7config]# systemctl restart httpd
http://********/dvwa/setup.php(此處的*****為你的centos7的IP地址)
跳到登錄頁面。
登錄:用戶為:admin 密碼:password
登錄進(jìn)去,看到這樣的界面,說明搭建好了!大功告成!可以開始練習(xí)web滲透了!?。。?/p>
關(guān)于Centos7中怎么搭建一個dvwa攻防演練系統(tǒng)問題的解答就分享到這里了,希望以上內(nèi)容可以對大家有一定的幫助,如果你還有很多疑惑沒有解開,可以關(guān)注億速云行業(yè)資訊頻道了解更多相關(guān)知識。
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報,并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。