Construction of DVWA Environment under Linux (Fedora)

Source: Internet
Author: User

Configuration of Dvwa under Linux (Fedora)


1. Download Httpd,dvwa,mysql,mysqlserver, php-mysql,php
In addition to the DVWA is under the official website, the rest of the services are installed by install
Yum install httpd, MySQL, Php-mysql, PHP
If there is an installation problem, you can first Yum search xxx



2. After installation, check the status of the installation and start the service
sudo systemctl start httpd, mysqld




3. Enter 127.0.0.1 in the browser, the Apache page appears, then the HTTPD service has been installed
If blank is displayed, enter in Terminal: NETSTAT-TLN View the port occupancy to ensure that the httpd port is already
In the range of listening, you can also: Systemctl status httpd View the state of httpd




4. Copy the downloaded DVWA to the following directory
Cp-a dvwa/var/www/html
VI test.php Create a new PHP file in the current directory for testing purposes
Enter under VI
<?php
Phpinfo ();
?>
Save and exit


5. In the browser, enter: 127.0.0.1/test.php
If the introduction page of PHP appears, then it is OK.
If you only show PHP code, can not parse, first check whether the installation of PHP is complete, yum install PHP
Then you can: cd/etc/httpd/conf ..... This directory finds the httpd.conf file, the version and the type of the hair different
There may be some differences, but it's all in this directory,
Open a config file to find
AddType application/x-compress. Z
AddType application/x-gzip. gz. tgz
Add a line later: AddType application/x-httpd-php. php


Problems that may be encountered,
Use ll to view usage rights
Permissions issue: Then add all Execute permissions
Browser Licensing issues: so Setenforce 0


6.vi/var/www/html/dvwa/config/config.inc.php opening the DVWA configuration file
The following changes are in place:
$_dvwa[' db_database '] = ' DVWA ';
$_dvwa[' db_user '] = ' DVWA ';
$_dvwa[' Db_password ' = ' root ';


7. Open MySQL,
Mysqladmin-u root-password xxxx Start setting the initial password
Open after: mysql-u root-p xxx
To add a DVWA database


8. Enter in the browser: 127.0.0.1/dvwa/setup.php Note is the setup file when your database configuration is not set well
Can be detected in time


A possible problem is a permissions issue: Add all x Execute permissions, use LL to view, view owner, both owners must
Use the Chcon command to clone the Test.php property to Dvwa
Browser Licensing issues: Setenforce 0


9. Good luck!

Construction of DVWA Environment under Linux (Fedora)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.