vulhub靶机配置

**备份原有的yum源**

[root@localhost ~]# mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

**配置aliyun的yum源**

[root@localhost /]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

**清楚yum缓存**

[root@localhost ~]# yum clean all

**列出所有可用软件包**

[root@localhost ~]# yum list all

**更新yum缓存**

[root@localhost /]# yum makecache

**vulhub官方安装docker**

[root@localhost /]# curl -s https://get.docker.com/ | sh

**查看docker版本**

[root@localhost /]# docker --version

**安装python3**

[root@localhost /]# yum install -y python3

**安装epel软件源**

[root@localhost /]# yum install epel-release

**安装pip包管理工具**

[root@localhost /]# yum install -y python3-pip

**更新pip**

[root@localhost /]# pip3 install --upgrade pip

**安装vulhub**

下载网址:https://vulhub.org/

**安装解压软件vulhub**

[root@localhost ~]# yum install -y unzip

**解压vulhub压缩包**

[root@localhost ~]# unzip vulhub-master.zip

**配置vulhub参数信息**

[root@localhost ~]# systemctl daemon-reload

[root@localhost ~]#cd /vulhub-master/httpd/apache_parsing_vulnerability

[root@localhost apache_parsing_vulnerability]# docker-compose build

[root@localhost apache_parsing_vulnerability]# docker-compose up -d

[root@localhost apache_parsing_vulnerability]# docker-compose config

**重新启动docker**

[root@localhost ~]# systemctl restart docker

**启动容器**

[root@localhost ~]# docker start ccf39fec762b

**查看所有容器和正在运行的容器**

[root@localhost ~]# docker ps -a

[root@localhost ~]# docker ps

**创建.pip文件(更新pip命令报错可使用以下方法)**

[root@localhost ~]# mkdir ~/.pip

[root@localhost ~]# cd .pip
[root@localhost .pip]# touch pip.conf
[root@localhost .pip]# vi pip.conf

```shell
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple

**安装docker-compose的第三方库**
[root@localhost .pip]# pip3 install --default-timeout=100 docker-compose

你可能感兴趣的:(网络安全,安全)