Linux 部署Pikachu靶场

环境部署

安装httpd及其相关的组件

yum install -y httpd httpd-devel

安装php及其相关组件

yum -y install php php-gd php-ldap php-odbc php-pear php-xml php-xmlrpc php-mysql

安装mariadb数据库

yum install -y mariadb mariadb-server mariadb-libs mariadb-devel

启动服务并设置自启动

systemctl start httpd
systemctl start mariadb
systemctl enable httpd
systemctl enable mariadb

打开防火墙

sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --reload

数据库初始化设置

mysql_secure_installation
Enter current password for root (enter for none): # 刚安装密码为空,直接Enter
OK, successfully used password, moving on... Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation. Set root password? [Y/n] y #设置root密码
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
... Success! By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment. Remove anonymous users? [Y/n] y #是否移除匿名用户
... Success! Normally, root should only be allowed to connect from 'localhost'. This
ensures that someone cannot guess at the root password from the network. Disallow root login remotely? [Y/n] y #是否禁止使用root用户进行远程连接数据库
... Success! By default, MariaDB comes with a database named 'test' that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment. Remove test database and access to it? [Y/n] y #是否移除测试数据库
- Dropping test database...
... Success!
- Removing privileges on test database...
... Success! Reloading the privilege tables will ensure that all changes made so far
will take effect immediately. Reload privilege tables now? [Y/n] y #是否重新分配权限
... Success! Cleaning up... All done! If you've completed all of the above steps, your MariaDB
installation should now be secure. Thanks for using MariaDB!

测试环境是否安装成功

在浏览器中使用ip进行访问

出现该页面表示安装成功

安装Pikachu

DVWA项目github地址:https://github.com/zhuifengshaonianhanlu/pikachu.git

下载后将压缩包上传至 /var/www/html

进行解压并重命名文件夹

unzip pikachu-master.zip
mv pikachu-master pikachu

进入pikachu/inc目录下,编辑config.inc.php文件

vim config.inc.php

配置如下

<?php
//全局session_start
session_start();
//全局居设置时区
date_default_timezone_set('Asia/Shanghai');
//全局设置默认字符
header('Content-type:text/html;charset=utf-8');
//定义数据库连接参数
define('DBHOST', 'localhost');//将localhost修改为数据库服务器的地址(注意:不要改为localhost不要改为127.0.0.1, 否则靶场会提示"数据库连接失败,请检查config.inc.php配置文件")
define('DBUSER', 'root');//将root修改为连接mysql的用户名
define('DBPW', '123456');//将root修改为连接mysql的密码,如果改了还是连接不上,请先手动连接下你的数据库,确保数据
库服务没问题在说!
define('DBNAME', 'pikachu');//自定义,建议不修改
define('DBPORT', '3306');//将3306修改为mysql的连接端口,默认tcp3306 ?>

修改完成后,重启Apache服务。并永久关闭防火墙。

systemctl restart httpd.service
sudo systemctl disable firewalld

在浏览器上输入 http://虚拟机IP/pikachu/install.php 对靶场进行初始化

然后就可以访问pikachu靶场了

Linux 部署Pikachu靶场的更多相关文章

  1. 利用xampp集成环境搭建pikachu靶场及部分问题解决

    xampp的环境部署 1.本地服务器的搭建 首先要到官网下载xampp https://www.apachefriends.org/zh_cn/index.html 有各个不同的系统版本,这里我们选择 ...

  2. Pikachu靶场SSRF学习

    下载Pikachu靶场:https://github.com/zhuifengshaonianhanlu/pikachu Windows用phpstudy也行,记得要改config.inc文件 打开S ...

  3. ASP.NET Linux部署(2) - MS Owin + WebApi + Mono + Jexus

    ASP.NET Linux部署(2) - MS Owin + WebApi + Mono + Jexus 本文承接我的上一篇博文: ASP.NET 5 Linux部署,那篇文章主要是针对最新的ASP. ...

  4. Linux 部署ASP.NET SQLite 应用 的坎坷之旅 附demo及源码

    Linux 部署ASP.NET SQLite 应用 的坎坷之旅.文章底部 附示例代码. 有一台闲置的Linux VPS,尝试着部署一下.NET 程序,结果就踏上了坑之路,不过最后算是完美解决问题,遂记 ...

  5. Linux部署ASP.NET 5 (vNext)

    原文:Linux部署ASP.NET 5 (vNext) ASP.NET 5 (vNext) Linux部署   引言 工欲善其事,必先利其器. 首先,我们先明确下以下基本概念 Linux相关 Ubun ...

  6. Linux tomcat部署War包,Linux在Tomcat部署JavaWeb项目,Linux部署War包

    Linux tomcat部署War包,Linux在Tomcat部署JavaWeb项目,Linux部署War包 >>>>>>>>>>>& ...

  7. Linux部署与基本指令

    把以前写的linux发布一下下吧,写的真的好差劲... Linux部署   chmod:改变一个文件的权限 改变abc的权限为777 常用的权限: 777-644-755 ************** ...

  8. NetCore1.1+Linux部署初体验

    1.环境准备 Centaos7+Win10 虚拟机 Win10安装VS2017 https://www.asp.net/downloads注意勾选下.Net Core 3.Centaos安装netco ...

  9. linux部署服务器遇到tomcat already start

    linux部署服务器遇到tomcat already start 前言,之前做了个汽车停车计费的后端,然后现在需要部署到服务器.正常部署,使用secureFx找到所属webapps目录,将文件上传.然 ...

  10. SpringBoot进阶教程(二十三)Linux部署Quartz

    在之前的一篇文章中<SpringBoot(九)定时任务Schedule>,已经详细介绍了关于schedule框架的配置和使用,有收到一些朋友关于部署的私信,所以抽时间整理一个linux部署 ...

随机推荐

  1. JS 正则表示式 字符串匹配 忽略大小写

    在项目中遇到了需要使用字符串进行正则匹配,同时还要忽略大小写可以按照以下方法:1 先使用new RegExp(newVal, 'i')生成需要匹配的规则,其中 'i' 表示忽略大小写2 再对相应的字符 ...

  2. HTML img标签

    1.基本用法 <img src="kof5.jpg" alt="特瑞"> src属性为图片的链接地址,如果图片加载失败,代替图片的就是alt属性设置 ...

  3. 华为云云日志服务 HarmonyOS NEXT采集最佳实践

    鸿蒙背景介绍 华为鸿蒙HarmonyOS系统是面向万物互联的全场景分布式操作系统,支持手机.平板.智能穿戴.智慧屏等多种终端设备运行,提供应用开发.设备开发的一站式服务的平台.2024 年 1 月 1 ...

  4. 关于Popup的小坑坑

    在做一个自定义的输入搜索框,用textbox+popup来实现.其中有一个小需求,当textbox激活并且没有文本输入的时候,也要显示popup.很自然的想到了使用IsKeyboardFocusedC ...

  5. 获取n级父目录名称

    DirectoryInfo GetPrant(DirectoryInfo path, int level) { DirectoryInfo temp = null; if (level > 1) ...

  6. three.js优化

    Three js 开发的一些知识整理,方便后期遇到类似的问题,能够及时查阅使用. three.js 性能优化方面,整理一下常用的优化方法或者方向,供大家一个优化思考的方向 尽量重用Material和G ...

  7. Vue项目报TypeError: Cannot read properties of undefined (reading '_wrapper')

    前情 最近在做一个营销活动的时候,我选择了Vue技术栈来开发. 坑位 项目看似一切都正常,但当我在绑定的js事件中去修改当前组件的data上的值时会报错:TypeError: Cannot read ...

  8. PM-企业数字化转型,数字化建设的重点

    在数字化转型深入推进的大背景下,加强数据管理,释放数据要素价值,实现企业数据价值的内部循环,形成企业数据资产,是各个企业顺应时代发展趋势,积极探索业绩新亮点的必由之路. 数字化转型四个阶段: 一. 业 ...

  9. 企业IT基础资源管理的“帮帮团”上线啦——源启云原生基础设施管理平台

    为助力企业提升基础资源一体化管理和交付效率,以更先进的基础设施管理方式来满足现代企业业务持续扩展和复杂化的需要,中电金信运用基础设施即代码(Infrastructure as Code,简称IaC)技 ...

  10. ASP.NET Core EventStream (SSE) 使用以及 WebSocket 比较

    在开发环境中,对于实时数据流的需求非常常见,最常用的技术包括 Server-Sent Events (SSE) 和 WebSocket. 什么是 Server-Sent Events (SSE)? S ...