dvmayum环境搭建

2022-05-19 09:49:15 浏览数 (1)

1.centos7.9配置isoyum源,安装apache和php,mariadb

代码语言:javascript复制
yum -y install httpd
yum -y install httpd-manual mod_ssl mod_perl mod_auth_mysql
yum -y install php php-mysql
yum -y install php-gd php-xml php-mbstring php-ldap php-pear php-xmlrp

代码语言:javascript复制
yum install  mariadb-server mysql
systemctl start mariadb
systemctl enable mariadb
mysql_secure_installation

2.上传dvwa文件解压替换config.inc.php,key文件,修改数据库root用户

代码语言:javascript复制
$_DVWA[ 'recaptcha_public_key' ]  = '6LdJJlUUAAAAAH1Q6cTpZRQ2Ah8VpyzhnffD0mBb';
$_DVWA[ 'recaptcha_private_key' ] = '6LdJJlUUAAAAAM2a3HrgzLczqdYp4g05EqDs-W4K';

3.修改文件夹权限和php.ini

代码语言:javascript复制
ps -ef | grep httpd
chown apache:apache /var/www/html//DVWA-master/hackable/uploads/
chown apache:apache /var/www/html//DVWA-master/external/phpids/0.6/lib/IDS/tmp/phpids_log.txt
chown apache:apache /var/www/html//DVWA-master/config
代码语言:javascript复制
; Whether to allow the treatment of URLs (like http:// or ftp://) as files.
; http://php.net/allow-url-fopen
allow_url_fopen = On

; Whether to allow include/require to open URLs (like http:// or ftp://) as files.
; http://php.net/allow-url-include
allow_url_include = On

4.大功告成

0 人点赞