JumpServer open source bastion machine installation and configuration

JumpServer open source bastion machine installation and configuration

1. Introduction

JumpServer bastion host helps enterprises manage and log in various types of assets in a more secure way.
Support
official website address: https://www.jumpserver.org/index.html

JumpServer adopts a layered architecture, which is the load layer, access layer, core layer, data layer, and storage layer.
The JumpServer application architecture diagram is as follows:
insert image description here

2. Download and install

2.1. Download

Visit the official website address to download resources:
https://community.fit2cloud.com/#/products/jumpserver/downloads
insert image description here
Click to download, select the first one to
insert image description here
download the file:
jumpserver-offline-installer-v3.4.1-amd64.tar .gz

2.2. Installation

1. Create a new folder.

cd /
mkdir jumpserver
cd jumpserver/

2. Copy the file into the folder, pressurize and rename it.

tar -xf jumpserver-offline-installer-v3.4.1-amd64.tar.gz	
mv jumpserver-offline-installer-v3.4.1-amd64.tar.gz jumpserver

3. Backup and modify configuration files.

cd jumpserver/jumpserver
cp config-example.txt config-example.txt_bak
vim config-example.txt

When modifying the configuration file, you need to pay attention to whether the port conflicts. The default port in the configuration is port 80. It is recommended to modify it to other ports.
Change here to: HTTP_PORT=8888
The rest of the configuration can not be modified, just use the default.

Other configuration files are as follows:

# 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=

4. Install.

命令:./jmsctl.sh install

insert image description here

All of the above are done automatically.

insert image description here
Among the above content that needs to be entered manually:
insert image description here

  1. To configure the external port,
    enter y for this configuration, and enter n for all others,
    and the rest is the installation.
    insert image description here

The surprising thing about this software is that after the installation is complete, some commonly used commands and access addresses will be posted, which deserves a good review.

2.3, other

After the installation is complete, it can be started directly.

./jmsctl.sh start

insert image description here

启动:./jmsctl.sh start
停止:./jmsctl.sh stop
重启:./jmsctl.sh restart
卸载:./jmsctl.sh uninstall
帮助:./jmsctl.sh --help

Default storage path: /data/jumpserver/
Component introduction of JumpServer:

Core 组件是 JumpServer 的核心组件,其他组件依赖此组件启动。
Koko 是服务于类 Unix 系统平台的组件,通过 SSH、Telnet 协议提供字符型连接。
Lion 是服务于 Windows 系统平台的组件,用于 Web 端访问 Windows 资产。
Omnidb 是服务于数据库的组件,用于可视化界面纳管数据库。
Celery 是处理异步任务的组件,用于执行 JumpServer 相关的自动化任务。
Magnus 是服务于数据库的组件,用于通过客户端代理访问数据库。
Razor 是服务于 RDP 协议组件,该组件主要功能是通过 JumpServer Client 方式访问 Windows 资产。

JumpServer open source bastion machine page configuration: https://blog.csdn.net/qq_38254635/article/details/131441770

Guess you like

Origin blog.csdn.net/qq_38254635/article/details/131438406