ubuntu under vulhub-master environment to build

First, the purpose

Suanlaisuanqu, since the past six months, due to various uncertain reasons, we have the Ubuntu environmentFryCountless times, and each time re-install will encounter a variety of problems. For convenience, the Internet and to communicate with you two bigwigs. He wrote this article. I limited capacity, there may be redundancy, which is used for convenience plus a possible, if insufficient, please exhibitions.

Second, Preface

This article is the process of installing vulhub-master environment after Ubuntu system installed, install their own Ubuntu system.

Third, start operation

== tips: the best use administrator mode, save a lot of unnecessary problems ==

3.1 First replaceable source

I am here is USTC source: To do the following

First, su -enter the administrator mode (as described later in the tutorial to set an administrator password)

sudo vim /etc/apt/source.list

The source of USTC copied directly up, here come directly to the source list

# 默认注释了源码仓库,如有需要可自行取消注释
deb https://mirrors.ustc.edu.cn/ubuntu/ xenial main restricted universe multiverse
# deb-src https://mirrors.ustc.edu.cn/ubuntu/ xenial main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
# deb-src https://mirrors.ustc.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
# deb-src https://mirrors.ustc.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
# deb-src https://mirrors.ustc.edu.cn/ubuntu/ xenial-security main restricted universe multiverse

# 预发布软件源,不建议启用
# deb https://mirrors.ustc.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse
# deb-src https://mirrors.ustc.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse

After the save and exit, the specific operation to press the ESC key is pressed: key input WQ, Qiaoxia Enter

3.2 with source file and update some system software

apt-get update

apt-get upgrade

apt-get dis-upgrade

apt-get clean (Clear update cache left)

3.3 Installation pip

command

sudo apt-get install python-pip

3.4 install the latest version docker

curl -s https://get.docker.com/ | sh

Start docker Service

docker service start

3.5 Installation compose

pip install docker-compose

3.6 Installation vulhub-master

3.6.1 install unzip

For convenience install unzip

apt-get install unzip

3.6.2 Download vulhub-master package

wget https://github.com/vulhub/vulhub/archive/master.zip -O vulhub-master.zip

3.6.3 decompression

unzip vulhub-master.zip

3.6.4 Some basic commands

Vulnerability environment starts

cd to the directory after the corresponding vulnerability

docker-compose up -d

Close loopholes environment

cd to the directory after the corresponding vulnerability

docker-compose down -v

Fourth, the problems encountered

4.1 administrator password settings

ubuntu default administrator password can be changed, enter the following commands directly

sudo passwd root

Then follow the prompts to set your administrator password.

4.2 no vim tools

Here you can download

sudo apt-get install vim

4.3 process lock sock (not sure so called right)

Error message generally

could not get lock Will follow later in the file directory

General explanation is apt to be occupied

Solution

1. Delete the file directory corresponding to the rmback to keep on top of the file directory

2. Reconfigure package sudo dpkg --configure -a

3. Update package source files.sudo apt update

4.4dpkg: error: parsing file '/var/lib/dpkg/updates/0009' near line 0:

Solution

rm -rf /var/lib/dpkg/updates/0009
sudo dpkg --configure -a

Guess you like

Origin www.cnblogs.com/minemk/p/11303475.html