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. python之Marshmallow

    文档说明:https://marshmallow.readthedocs.io marshmallow是一个用来将复杂的orm对象与python原生数据类型之间相互转换的库,简而言之,就是实现obje ...

  2. Python3之常用包汇总

    Python包网站: https://pypi.org/ 1. 繁体与简体转换(https://github.com/berniey/hanziconv.git) pip install hanzic ...

  3. OAuth2 当前登录用户修改

    1.业务说明 有些情况下,我们希望用户登录后,可以修改用户的某些信息,比如修改当前的公司信息. 2.实现方法 @Resource TokenStore tokenStore; public JsonR ...

  4. Javascript 构造函数和类

    1.构造函数 含义:所谓"构造函数",就是专门用来生成实例对象的函数.它就是对象的模板,描述实例对象的基本结构.一个构造函数,可以生成多个实例对象,这些实例对象都有相同的结构 写法 ...

  5. Winform窗体控件双向绑定数据模拟读写PLC数据

    1.用Modbus工具模拟PLC 2.创建一个实体类 点击查看代码 internal class Data : INotifyPropertyChanged { ushort[] ushorts = ...

  6. CentOS上配合nginx 使用 Certbot 生成SSL证书

    您可以使用 Let's Encrypt 来申请免费的 SSL 证书.以下是在 CentOS 上安装 Certbot 并使用它来获取 Let's Encrypt SSL 证书的步骤: 安装 Certbo ...

  7. Gitlab:Restoring PostgreSQL database gitlabhq_production ... ERROR: must be owner of extension pg_trgm

    Restoring PostgreSQL database gitlabhq_production ... ERROR: must be owner of extension pg_trgm ERRO ...

  8. .NET 服务发现

    .NET 服务发现 https://learn.microsoft.com/en-us/dotnet/core/extensions/service-discovery?tabs=dotnet-cli ...

  9. 2024年1月Java项目开发指南6:接口测试

    我们使用API Fox这款工具对接口进行测试. (你要是会其他的例如postman进行测试也行) https://apifox.com/ 新建一个项目,新增一个接口 因为这个接口没有参数,所以无需填写 ...

  10. 【Python】【Pandas】将符合条件行的某列数值改为负数

    萌狼蓝天情景还原: 支付宝/微信导出的账单,不管支出还是收入都是正数. 我想把支出的金额改成负数,其他不变就这样. 解决办法 这里用到的是pandas.apply e--下面的写法虽然比较麻烦,但是 ...