安装 堡垒机 docker

参考 Docker部署常见应用之企业级堡垒机JumpServer_jumpserver docker-CSDN博客

 

创建文件夹

mkdir -p /opt/jumpserver/core/data
mkdir -p /opt/jumpserver/koko/data
mkdir -p /opt/jumpserver/lion/data
mkdir -p /opt/jumpserver/kael/data
mkdir -p /opt/jumpserver/chen/data
mkdir -p /opt/jumpserver/web/log

 

执行docker 命令

 

docker network create jumpserver

 

sudo docker run --name jms_all -d \
  -p 80:80 \
  -p 2222:2222 \
  -p 30000-30100:30000-30100 \
  -e SECRET_KEY=jdjpxwttxSTRSuQYWRilsCV8eZWEAFyE239wERZL1LjOJwqX1K \
  -e BOOTSTRAP_TOKEN=vWD4bJCCYocvqM7CF6CAA3neJciW2u \
  -e LOG_LEVEL=ERROR \
  -e DB_HOST=192.168.10.111 \
  -e DB_PORT=3306 \
  -e DB_USER=root \
  -e DB_PASSWORD=root\
  -e DB_NAME=jumpserver \
  -e REDIS_HOST=192.168.10.11 \
  -e REDIS_PORT=6379 \
  -e REDIS_PASSWORD= \
  --privileged=true \
  -v /data/docker/jumpserver/core/data:/opt/jumpserver/data \
  -v /data/docker/jumpserver/koko/data:/opt/jumpserver/koko/data \
  -v /data/docker/jumpserver/lion/data:/opt/jumpserver/lion/data \
  -v /data/docker/jumpserver/kael/data:/opt/jumpserver/kael/data \
  -v /data/docker/jumpserver/chen/data:/opt/jumpserver/chen/data \
  -v /data/docker/jumpserver/web/log:/opt/jumpserver/web/log \
  --network jumpserver \
  jumpserver/jms_all:v3.10.10

 

开放防火墙端口

sudo firewall-cmd --zone=public --add-port=80/tcp --permanent
sudo firewall-cmd --zone=public --add-port=2222/tcp --permanent
sudo firewall-cmd --zone=public --add-port=30000-30100/tcp --permanent
firewall-cmd --reload
sudo firewall-cmd --zone=public --list-ports

 

等等创建完成 admin   admin 登录

 

posted @ 2024-10-23 15:50  一文搞懂  阅读(6)  评论(0编辑  收藏  举报