PHP笔记网

革命尚未成功,同志仍须努力下载JDK17

作者:Albert.Wen  添加时间:2023-12-03 01:26:25  修改时间:2024-12-03 14:47:12  分类:IT运维/网络管理  编辑
  1. 配置文件路径/opt/jumpserver/config/config.txt
  2. 日志文件路径/data/jumpserver/
1. 可以使用如下命令启动, 然后访问
cd /opt/jumpserver-installer-v3.9.3
./jmsctl.sh start
 
2. 其它一些管理命令
./jmsctl.sh stop
./jmsctl.sh restart
./jmsctl.sh backup
./jmsctl.sh upgrade
更多还有一些命令, 你可以 ./jmsctl.sh --help 来了解
 
3. Web 访问
http://10.0.2.15:80
默认用户: admin  默认密码: admin
 
4. SSH/SFTP 访问
ssh -p2222 admin@10.0.2.15
sftp -P2222 admin@10.0.2.15

 


JumpServer命令大全

[root@CentOS7-A ~]# cd /opt/jumpserver-installer-v3.9.3
[root@CentOS7-A jumpserver-installer-v3.9.3]# ./jmsctl.sh --help

JumpServer 部署管理脚本

Usage: 
  ./jmsctl.sh [COMMAND] [ARGS...]
  ./jmsctl.sh --help

Installation Commands: 
  install           安装 JumpServer
  upgrade [version] 升级 JumpServer
  check_update      检查 JumpServer
  reconfig          重新配置 JumpServer

Management Commands: 
  start             启动 JumpServer
  stop              停止 JumpServer
  restart           重启 JumpServer
  status            检查 JumpServer
  down              下线 JumpServer
  uninstall         卸载 JumpServer

More Commands: 
  load_image        加载 Docker 镜像
  backup_db         备份数据库
  restore_db [file] 通过数据库备份文件恢复数据
  raw               执行原始 docker-compose 命令
  tail [service]    查看日志

 


JumpServer一键安装:

  • 支持主流 Linux 发行版本(基于 Debian / RedHat,包括国产操作系统)
  • Gentoo / Arch Linux 请通过 源码安装
  • 如用于生产环境,推荐使用 离线安装包 进行部署

第一步:在线安装

[root@CentOS7-A ~]# curl -sSL https://resource.fit2cloud.com/jumpserver/jumpserver/releases/latest/download/quick_start.sh | bash
download install script to /opt/jumpserver-installer-v3.9.3


       ██╗██╗   ██╗███╗   ███╗██████╗ ███████╗███████╗██████╗ ██╗   ██╗███████╗██████╗
       ██║██║   ██║████╗ ████║██╔══██╗██╔════╝██╔════╝██╔══██╗██║   ██║██╔════╝██╔══██╗
       ██║██║   ██║██╔████╔██║██████╔╝███████╗█████╗  ██████╔╝██║   ██║█████╗  ██████╔╝
  ██   ██║██║   ██║██║╚██╔╝██║██╔═══╝ ╚════██║██╔══╝  ██╔══██╗╚██╗ ██╔╝██╔══╝  ██╔══██╗
  ╚█████╔╝╚██████╔╝██║ ╚═╝ ██║██║     ███████║███████╗██║  ██║ ╚████╔╝ ███████╗██║  ██║
   ╚════╝  ╚═════╝ ╚═╝     ╚═╝╚═╝     ╚══════╝╚══════╝╚═╝  ╚═╝  ╚═══╝  ╚══════╝╚═╝  ╚═╝

                                                                   Version:  v3.9.3  

1. 检查配置文件
配置文件位置: /opt/jumpserver/config
/opt/jumpserver/config/config.txt        [ √ ]
/opt/jumpserver/config/nginx/cert/server.crt     [ √ ]
/opt/jumpserver/config/nginx/cert/server.key     [ √ ]
完成

>>> 安装配置 Docker
1. 安装 Docker
开始下载 Docker 程序 ...
开始下载 Docker Compose 程序 ...
完成

2. 配置 Docker
是否需要支持 IPv6? (y/n)  (默认为 n): 完成

3. 启动 Docker
Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /etc/systemd/system/docker.service.
完成

>>> 加载 Docker 镜像
[jumpserver/koko:v3.9.3] pulling
[jumpserver/mariadb:10.6] pulling
[jumpserver/redis:6.2] pulling
[jumpserver/web:v3.9.3] pulling
[jumpserver/core-ce:v3.9.3] pulling
[jumpserver/magnus:v3.9.3] pulling
[jumpserver/chen:v3.9.3] pulling
[jumpserver/kael:v3.9.3] pulling
[jumpserver/lion:v3.9.3] pulling
6.2: Pulling from jumpserver/redis
...
10.6: Pulling from jumpserver/mariadb
...
v3.9.3: Pulling from jumpserver/web
...
v3.9.3: Pulling from jumpserver/koko
...
v3.9.3: Pulling from jumpserver/core-ce
...
v3.9.3: Pulling from jumpserver/magnus
...
v3.9.3: Pulling from jumpserver/lion
...
v3.9.3: Pulling from jumpserver/kael
...
完成

>>> 安装配置 JumpServer
1. 配置加密密钥
SECRETE_KEY:     YTQzMmQ3NjAtMTQ5ZC1lMTRlLTg5ZDEtZTU5MmNlYzJkZGFh
BOOTSTRAP_TOKEN: YTQzMmQ3NjAtMTQ5ZC1lMTRl
完成

2. 配置持久化目录
是否需要自定义持久化存储, 默认将使用目录 /data/jumpserver? (y/n)  (默认为 n): 完成

3. 配置 MySQL
是否使用外部 MySQL? (y/n)  (默认为 n): 完成

4. 配置 Redis
是否使用外部 Redis? (y/n)  (默认为 n): 完成

5. 配置外部访问
是否需要配置 JumpServer 对外访问端口? (y/n)  (默认为 n): 完成

6. 初始化数据库
[+] Building 0.0s (0/0)                                                                                  docker:default
[+] Running 4/4
 ✔ Network jms_net      Created                                                                                    3.3s 
 ✔ Container jms_redis  Started                                                                                    1.6s 
 ✔ Container jms_core   Started                                                                                    1.6s 
 ✔ Container jms_mysql  Started                                                                                    1.5s 
2023-12-02 23:26:02 Collect static files
2023-12-02 23:26:07 Collect static files done
2023-12-02 23:26:07 Check database structure change ...
2023-12-02 23:26:07 Migrate model change to database ...
ALLOWED_HOSTS: 
  - localhost
  - core:8080
  - 127.0.0.1
  - 127.0.0.1:8080
  - 127.0.0.1:80
  - localhost:8080
  - localhost:80
  - core:8080
  - core:80
ALLOWED_HOSTS: 
  - localhost
  - core:8080
  - 127.0.0.1
  - 127.0.0.1:8080
  - 127.0.0.1:80
  - localhost:8080
  - localhost:80
  - core:8080
  - core:80
Operations to perform:
  Apply all migrations: accounts, acls, admin, applications, assets, audits, auth, authentication, captcha, common, contenttypes, django_cas_ng, django_celery_beat, notifications, ops, orgs, perms, rbac, sessions, settings, terminal, tickets, users
...
After migration, update builtin role permissions
  - Update builtin roles
完成

>>> 安装完成了
1. 可以使用如下命令启动, 然后访问
cd /opt/jumpserver-installer-v3.9.3
./jmsctl.sh start

2. 其它一些管理命令
./jmsctl.sh stop
./jmsctl.sh restart
./jmsctl.sh backup
./jmsctl.sh upgrade
更多还有一些命令, 你可以 ./jmsctl.sh --help 来了解

3. Web 访问
http://10.0.2.15:80
默认用户: admin  默认密码: admin

4. SSH/SFTP 访问
ssh -p2222 admin@10.0.2.15
sftp -P2222 admin@10.0.2.15

5. 更多信息
我们的官网: https://www.jumpserver.org/
我们的文档: https://docs.jumpserver.org/


[+] Building 0.0s (0/0)                                                                                  docker:default
[+] Running 10/10
 ✔ Container jms_kael    Created                                                                                   1.0s 
 ✔ Container jms_koko    Created                                                                                   1.4s 
 ✔ Container jms_redis   Running                                                                                   0.0s 
 ✔ Container jms_web     Created                                                                                   0.9s 
 ✔ Container jms_chen    Created                                                                                   0.8s 
 ✔ Container jms_mysql   Running                                                                                   0.0s 
 ✔ Container jms_magnus  Created                                                                                   1.4s 
 ✔ Container jms_lion    Created                                                                                   0.8s 
 ✔ Container jms_celery  Created                                                                                   0.8s 
 ✔ Container jms_core    Recreated                                                                                 5.3s

第二步:配置端口

  1. 配置文件路径/opt/jumpserver/config/config.txt
  2. 日志文件路径/data/jumpserver/

因为80端口被“宝塔面板”的Nginx占用了,所以需要针对性地调整:

(1) 设置 HTTP_PORT

HTTP_PORT=19115

(2) 设置 DOMAINS

DOMAINS="192.168.1.51:19115"

(3) 重启JumpServer

cd /opt/jumpserver-installer-v3.9.3
./jmsctl.sh restart