Ubuntu offline installation and deployment of JumpServer3.0 bastion machine

1. Product introduction

JumpServer is a popular open source bastion host and a professional operation and maintenance security audit system that complies with 4A specifications. JumpServer product features include:

  • Open source: zero threshold, quick acquisition and installation online;
  • Distributed: easily support large-scale concurrent access;
  • No plug-ins: only a browser is required, the ultimate Web Terminal experience;
  • Multi-cloud support: one system manages assets on different clouds at the same time;
  • Cloud storage: audit video cloud storage, never lost;
  • Multi-tenant: One system can be used by multiple subsidiaries and departments at the same time;
  • Multi-application support: database, Windows remote application, Kubernetes.

2. Installation preparation

A. Enter the system installation directory and download the JumpServer installation package.

For example, I want to install the opt folder in the root directory of Ubuntu

cd /opt

wget https://cdn0-download-offline-installer.fit2cloud.com/jumpserver/jumpserver-offline-installer-v3.0.4-amd64-247.tar.gz?Expires=1680858799&OSSAccessKeyId=LTAI5tLEMt8jTT4RDrZ9mXns&Signature=JCkQD4GxMN4ewyCcXpbzUBKQ1NU%3D

#解压并进入到解压目录

tar -xf jumpserver-offline-installer-v3.0.4-amd64-247.tar.gz
cd jumpserver-offline-installer-v3.0.4-amd64-247


# 根据需要修改配置文件模板, 如果不清楚用途可以跳过修改
cat config-example.txt

B. Modify the corresponding content as needed, for example, the most direct way is to modify the port

# JumpServer configuration file example.
#
# 如果不了解用途可以跳过修改此配置文件, 系统会自动填入
# 完整参数文档 https://docs.jumpserver.org/zh/v3/guide/env/

################################## 镜像配置 ###################################
#
# 国内连接 docker.io 会超时或下载速度较慢, 开启此选项使用华为云镜像加速
# 取代旧版本 DOCKER_IMAGE_PREFIX
#
# DOCKER_IMAGE_MIRROR=1

################################## 安装配置 ###################################
#
# JumpServer 数据库持久化目录, 默认情况下录像、任务日志都在此目录
# 请根据实际情况修改, 升级时备份的数据库文件(.sql)和配置文件也会保存到该目录
#
VOLUME_DIR=/data/jumpserver

# 加密密钥, 迁移请保证 SECRET_KEY 与旧环境一致, 请勿使用特殊字符串
# (*) Warning: Keep this value secret.
# (*) 勿向任何人泄露 SECRET_KEY
#
SECRET_KEY=

# 组件向 core 注册使用的 token, 迁移请保持 BOOTSTRAP_TOKEN 与旧环境一致,
# 请勿使用特殊字符串
# (*) Warning: Keep this value secret.
# (*) 勿向任何人泄露 BOOTSTRAP_TOKEN
#
BOOTSTRAP_TOKEN=

# 日志等级 INFO, WARN, ERROR
#
LOG_LEVEL=ERROR

# JumpServer 容器使用的网段, 请勿与现有的网络冲突, 根据实际情况自行修改
#
DOCKER_SUBNET=192.168.250.0/24

# ipv6 nat, 正常情况下无需开启
# 如果宿主不支持 ipv6 开启此选项将会导致无法获取真实的客户端 ip 地址
#
USE_IPV6=0
DOCKER_SUBNET_IPV6=fc00:1010:1111:200::/64

################################# MySQL 配置 ##################################
# 外置 MySQL 需要输入正确的 MySQL 信息, 内置 MySQL 系统会自动处理
#
DB_HOST=mysql
DB_PORT=3306
DB_USER=root
DB_PASSWORD=
DB_NAME=jumpserver

# 如果外置 MySQL 需要开启 TLS/SSL 连接, 参考 https://docs.jumpserver.org/zh/v3/installation/security_setup/mysql_ssl/
#
# DB_USE_SSL=True

################################# Redis 配置 ##################################
# 外置 Redis 需要请输入正确的 Redis 信息, 内置 Redis 系统会自动处理
#
REDIS_HOST=redis
REDIS_PORT=6379
REDIS_PASSWORD=

# 如果使用外置 Redis Sentinel, 请手动填写下面内容
#
# REDIS_SENTINEL_HOSTS=mymaster/192.168.100.1:26379,192.168.100.1:26380,192.168.100.1:26381
# REDIS_SENTINEL_PASSWORD=your_sentinel_password
# REDIS_PASSWORD=your_redis_password
# REDIS_SENTINEL_SOCKET_TIMEOUT=5

# 如果外置 Redis 需要开启 TLS/SSL 连接, 参考 https://docs.jumpserver.org/zh/v3/installation/security_setup/redis_ssl/
#
# REDIS_USE_SSL=True

################################## 访问配置 ###################################
# 对外提供服务端口, 如果与现有服务冲突请自行修改
#
HTTP_PORT=80
SSH_PORT=2222
MAGNUS_MYSQL_PORT=33061
MAGNUS_MARIADB_PORT=33062
MAGNUS_REDIS_PORT=63790
MAGNUS_POSTGRESQL_PORT=54320
MAGNUS_ORACLE_PORTS=30000-30030

################################# HTTPS 配置 #################################
# 参考 https://docs.jumpserver.org/zh/v3/installation/proxy/ 配置
#
# HTTPS_PORT=443
# SERVER_NAME=your_domain_name
# SSL_CERTIFICATE=your_cert
# SSL_CERTIFICATE_KEY=your_cert_key
#

# Nginx 文件上传下载大小限制
#
CLIENT_MAX_BODY_SIZE=4096m

################################## 组件配置 ###################################
# 组件注册使用, 默认情况下向 core 容器注册, 集群环境需要修改为集群 vip 地址
#
CORE_HOST=http://core:8080
PERIOD_TASK_ENABLED=True

# Core Session 定义,
# SESSION_COOKIE_AGE 表示闲置多少秒后 session 过期,
# SESSION_EXPIRE_AT_BROWSER_CLOSE=true 表示关闭浏览器即 session 过期
#
# SESSION_COOKIE_AGE=86400
SESSION_EXPIRE_AT_BROWSER_CLOSE=True

# Lion 开启字体平滑, 优化体验
#
JUMPSERVER_ENABLE_FONT_SMOOTHING=True

################################# XPack 配置 #################################
# XPack 包, 开源版本设置无效
#
RDP_PORT=3389

################################## 其他配置 ##################################
# 终端使用宿主 HOSTNAME 标识, 首次安装自动生成
#
SERVER_HOSTNAME=${HOSTNAME}

# 当前运行的 JumpServer 版本号, 安装和升级完成后自动生成
#
CURRENT_VERSION=

C. Execute the installation

# 执行安装
./jmsctl.sh install

# 安装完启动
./jmsctl.sh start


###################################################################

下面是卸载和帮助命令

# 卸载
./jmsctl.sh uninstall

# 帮助
./jmsctl.sh -h

During the installation process, some need to be selected manually.

 When this interface appears, the installation is successful.

 D. Access via WEB

Open the computer's browser, enter the access address displayed above, and enter the user name and password to log in.

 F, the specific use of the background of the web

        Please refer to my other articles for specific usage methods, the following is the link

The latest jumpserver3.0 web background tutorial

Guess you like

Origin blog.csdn.net/qq_35002542/article/details/129423804