Construction of the vulfocus shooting range

1.  Configure the yum source as Alibaba Cloud

backup file

cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
 

Download Alibaba Cloud Overlay Original File 

 curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

 Check the content to confirm successful coverage

cat /etc/yum.repos.d/CentOS-Base.repo

 Clear cache and generate new cache

yum clean all
yum makecache

 2. Build docker

yum list docker-ce --showduplicates | sort -r
 

 add yum source

yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
 

 update yum cache

sudo yum makecache fast

 Install related dependencies first

yum install -y yum-utils  device-mapper-persistent-data lvm2
 

 Install the latest version or specified version of Docker CE

yum install docker-ce -y
yum install docker-ce-18.06.3.ce-3.el7 -y

 View docker version

docker version

 start and boot

 systemctl start docker
systemctl enable docker

 mirror acceleration

vim /etc/docker/daemon.json

 to write

{"registry-mirrors":["https://reg-mirror.qiniu.com/"]}
 

 restart service

sudo systemctl daemon-reload
sudo systemctl restart docker
 

 3. Install docker-compose

yum install python3-pip
pip3 install --upgrade pip
pip3 install docker-compose
docker-compose version

 4. Some commands of docker

docker command
#docker help command
docker -help
#View docker version
docker -v
#Open docker
systemctl start docker
#Stop docker
systemctl stop docker
#Restart docker systemctl
restart docker
#Set docker boot self-start
systemctl enable docker
#View docker status
systemctl status docker

docker container command
#View docker mirror list
docker images
#View running docker container
docker ps
#View all docker containers
docker ps -a
#Open docker container
docker-compose up -d
#Stop docker container
docker-compose down
#Open/Stop /Delete docker specified container
docker start/stop/rm container ID
#delete stopped docker container
docker rm $(docker ps -a -q)
#delete all docker containers
docker rmi $(docker images -q)
#enter interactive docker
docker exec -it container ID /bin/bash

#Prohibit docker from booting

systemctl disable docker

5. Download vulfocus shooting range

mkdir VF Range
cd VF Range/
git clone https://github.com/fofapro/vulfocus.git web

 6. Configure environment parameters (the ip address of your own Centes, if you don’t know it, you can check it with ifconfig)

cd web/
vim docker-compose.yaml

 

 7. Start the service and view the running

docker-compose up

docker ps

 8. Physical machine login

Enter the ip address of your own Centes in the browser, and the default account password is all admin.

Guess you like

Origin blog.csdn.net/qq_68890680/article/details/131351918