迁移文档

升级及迁移请保持 SECRET_KEY 与旧版本一致,否则会导致数据库加密数据无法解密

迁移说明

v2.6 版本升级说明

  • 统一企业版本与开源版本安装方式,企业版和社区版可以无缝切换
  • 今后只会维护此安装方式,其他安装方式不再提供技术支持
  • 安装完成后配置文件在 /opt/jumpserver/config/config.txt

迁移步骤

备份数据库

  1. # 从 jumpserver/config.yml 获取数据库信息
  2. DB_HOST: 127.0.0.1 # 数据库服务器 IP
  3. DB_PORT: 3306 # 数据库服务器 端口
  4. DB_USER: jumpserver # 连接数据库的用户
  5. DB_PASSWORD: ****** # 连接数据库用户的密码
  6. DB_NAME: jumpserver # JumpServer 使用的数据库
  7. # mysqldump -h<DB_HOST> -P<DB_PORT> -u<DB_USER> -p<DB_PASSWORD> <DB_NAME> > /opt/<DB_NAME>.sql

installer 部署源码部署组件容器化部署setuptools 脚本部署docker 部署docker-compose 部署

  1. # 记录 SECRET_KEY 和 BOOTSTRAP_TOKEN
  2. cat /opt/jumpserver/config/config.txt | egrep "SECRET_KEY|BOOTSTRAP_TOKEN"
  1. ./jmsctl.sh backup_db
  1. cd /opt/koko
  2. ./koko -s stop
  3. # 更老的版本使用的 coco guacamole
  4. # cd /opt/coco
  5. # ./cocod stop
  6. # /etc/init.d/guacd stop
  7. # sh /config/tomcat9/bin/shutdown.sh
  1. cd /opt/lion
  2. ps aux | grep lion | awk '{print $2}' | xargs kill -9
  1. cd /opt/jumpserver
  2. # 记录 SECRET_KEY 和 BOOTSTRAP_TOKEN
  3. cat config.yml | egrep "SECRET_KEY|BOOTSTRAP_TOKEN"
  1. source /opt/py3/bin/activate
  2. ./jms stop
  1. cd /opt
  2. mv /opt/jumpserver /opt/jumpserver_bak
  1. mysqldump -h127.0.0.1 -P3306 -ujumpserver -p jumpserver > /opt/jumpserver.sql
  1. docker stop jms_koko jms_lion
  2. docker rm jms_koko jms_lion
  3. # 更老的版本使用的 coco guacamole
  4. # docker stop jms_coco jms_guacamole
  5. # docker rm jms_coco jms_guacamole
  1. cd /opt/jumpserver
  2. # 记录 SECRET_KEY 和 BOOTSTRAP_TOKEN
  3. cat config.yml | egrep "SECRET_KEY|BOOTSTRAP_TOKEN"
  1. source /opt/py3/bin/activate
  2. ./jms stop
  1. cd /opt
  2. mv /opt/jumpserver /opt/jumpserver_bak
  1. mysqldump -h127.0.0.1 -P3306 -ujumpserver -p jumpserver > /opt/jumpserver.sql
  1. cd /opt/setuptools
  2. # 记录 SECRET_KEY 和 BOOTSTRAP_TOKEN
  3. cat config.conf | egrep "SECRET_KEY|BOOTSTRAP_TOKEN"
  1. ./jmsctl.sh stop
  2. docker rm jms_koko jms_guacamole
  3. systemctl disable jms_core
  4. mv /opt/jumpserver /opt/jumpserver_bak
  1. mysqldump -h127.0.0.1 -P3306 -ujumpserver -p jumpserver > /opt/jumpserver.sql
  1. docker cp jms_all:/opt/jumpserver /opt/jumpserver_bak
  2. # 记录 SECRET_KEY 和 BOOTSTRAP_TOKEN
  3. docker exec -it jms_all env | egrep "SECRET_KEY|BOOTSTRAP_TOKEN"
  1. docker exec -it jms_all /bin/bash
  2. mysqldump -h$DB_HOST -P$DB_PORT -u$DB_USER -p$DB_PASSWORD $DB_NAME > /opt/jumpserver.sql
  3. exit
  1. docker cp jms_all:/opt/jumpserver.sql /opt
  2. docker stop jms_all
  1. docker cp jms_core:/opt/jumpserver /opt/jumpserver_bak
  2. # 记录 SECRET_KEY 和 BOOTSTRAP_TOKEN
  3. docker exec -it jms_core env | egrep "SECRET_KEY|BOOTSTRAP_TOKEN"
  1. docker exec -it jms_mysql /bin/bash
  2. mysqldump -uroot jumpserver > /opt/jumpserver.sql
  3. exit
  1. docker cp jms_mysql:/opt/jumpserver.sql /opt
  2. cd /opt/Dockerfile
  3. docker-compose stop

修改数据库字符集

  1. # 如果你不需要或不想处理数据库字符集可以跳过此步骤, 保证迁移前后的数据库字符集一样即可.
  2. if grep -q 'COLLATE=utf8_bin' /opt/jumpserver.sql; then
  3. cp /opt/jumpserver.sql /opt/jumpserver_bak.sql
  4. sed -i 's@ COLLATE=utf8_bin@@g' /opt/jumpserver.sql
  5. sed -i 's@ COLLATE utf8_bin@@g' /opt/jumpserver.sql
  6. else
  7. echo "备份数据库字符集正确";
  8. fi

下载 jumpserver-install

  1. cd /opt
  2. yum -y install wget
  3. wget https://github.com/jumpserver/installer/releases/download/v2.28.7/jumpserver-installer-v2.28.7.tar.gz
  4. tar -xf jumpserver-installer-v2.28.7.tar.gz
  5. cd jumpserver-installer-v2.28.7
  1. vi config-example.txt
  1. # 修改下面选项, 其他保持默认
  2. ### 数据持久化目录, 安装完成后请勿随意更改, 可以使用其他目录如: /data/jumpserver
  3. VOLUME_DIR=/opt/jumpserver
  4. ### 注意: SECRET_KEY 与旧版本不一致, 加密的数据将无法解密
  5. # Core 配置
  6. ### 启动后不能再修改,否则密码等等信息无法解密
  7. SECRET_KEY= # 从旧版本的配置文件获取后填入 (*)
  8. BOOTSTRAP_TOKEN= # 从旧版本的配置文件获取后填入 (*)
  9. LOG_LEVEL=ERROR
  10. # SESSION_COOKIE_AGE=86400
  11. SESSION_EXPIRE_AT_BROWSER_CLOSE=True # 关闭浏览器后 session 过期

开始部署 JumpServer

使用新的内置数据库使用新的外置数据库使用旧的外置数据库

  1. ./jmsctl.sh install
  1. ██╗██╗ ██╗███╗ ███╗██████╗ ███████╗███████╗██████╗ ██╗ ██╗███████╗██████╗
  2. ██║██║ ██║████╗ ████║██╔══██╗██╔════╝██╔════╝██╔══██╗██║ ██║██╔════╝██╔══██╗
  3. ██║██║ ██║██╔████╔██║██████╔╝███████╗█████╗ ██████╔╝██║ ██║█████╗ ██████╔╝
  4. ██ ██║██║ ██║██║╚██╔╝██║██╔═══╝ ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██╔══╝ ██╔══██╗
  5. ╚█████╔╝╚██████╔╝██║ ╚═╝ ██║██║ ███████║███████╗██║ ██║ ╚████╔╝ ███████╗██║ ██║
  6. ╚════╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚══════╝╚═╝ ╚═╝
  7. Version: v2.28.7
  8. 1. 检查配置文件
  9. 配置文件位置: /opt/jumpserver/config
  10. /opt/jumpserver/config/config.txt [ ]
  11. /opt/jumpserver/config/nginx/lb_rdp_server.conf [ ]
  12. /opt/jumpserver/config/nginx/lb_ssh_server.conf [ ]
  13. /opt/jumpserver/config/nginx/cert/server.crt [ ]
  14. /opt/jumpserver/config/nginx/cert/server.key [ ]
  15. 完成
  16. 2. 备份配置文件
  17. 备份至 /opt/jumpserver/config/backup/config.txt.2021-07-15_22-26-13
  18. 完成
  19. >>> 安装配置 Docker
  20. 1. 安装 Docker
  21. 开始下载 Docker 程序 ...
  22. 开始下载 Docker Compose 程序 ...
  23. 完成
  24. 2. 配置 Docker
  25. 是否需要自定义 docker 存储目录, 默认将使用目录 /var/lib/docker? (y/n) (默认为 n): n
  26. 完成
  27. 3. 启动 Docker
  28. Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /etc/systemd/system/docker.service.
  29. 完成
  30. >>> 加载 Docker 镜像
  31. Docker: Pulling from jumpserver/core:v2.28.7 [ OK ]
  32. Docker: Pulling from jumpserver/koko:v2.28.7 [ OK ]
  33. Docker: Pulling from jumpserver/web:v2.28.7 [ OK ]
  34. Docker: Pulling from jumpserver/redis:6-alpine [ OK ]
  35. Docker: Pulling from jumpserver/mysql:5 [ OK ]
  36. Docker: Pulling from jumpserver/lion:v2.28.7 [ OK ]
  37. >>> 安装配置 JumpServer
  38. 1. 配置网络
  39. 是否需要支持 IPv6? (y/n) (默认为 n): n
  40. 完成
  41. 2. 配置加密密钥
  42. SECRETE_KEY: YTE2YTVkMTMtMGE3MS00YzI5LWFlOWEtMTc2OWJlMmIyMDE2
  43. BOOTSTRAP_TOKEN: YTE2YTVkMTMtMGE3
  44. 完成
  45. 3. 配置持久化目录
  46. 是否需要自定义持久化存储, 默认将使用目录 /opt/jumpserver? (y/n) (默认为 n): n
  47. 完成
  48. 4. 配置 MySQL
  49. 是否使用外部 MySQL? (y/n) (默认为 n): n
  50. 完成
  51. 5. 配置 Redis
  52. 是否使用外部 Redis? (y/n) (默认为 n): n
  53. 完成
  54. 6. 配置对外端口
  55. 是否需要配置 JumpServer 对外访问端口? (y/n) (默认为 n): n
  56. 完成
  57. 7. 初始化数据库
  58. Creating network "jms_net" with driver "bridge"
  59. Creating jms_mysql ... done
  60. Creating jms_redis ... done
  61. 2021-07-15 22:39:52 Collect static files
  62. 2021-07-15 22:39:52 Collect static files done
  63. 2021-07-15 22:39:52 Check database structure change ...
  64. 2021-07-15 22:39:52 Migrate model change to database ...
  65. 475 static files copied to '/opt/jumpserver/data/static'.
  66. Operations to perform:
  67. Apply all migrations: acls, admin, applications, assets, audits, auth, authentication, captcha, common, contenttypes, django_cas_ng, django_celery_beat, jms_oidc_rp, notifications, ops, orgs, perms, sessions, settings, terminal, tickets, users
  68. Running migrations:
  69. Applying contenttypes.0001_initial... OK
  70. Applying contenttypes.0002_remove_content_type_name... OK
  71. Applying auth.0001_initial... OK
  72. Applying auth.0002_alter_permission_name_max_length... OK
  73. Applying auth.0003_alter_user_email_max_length... OK
  74. Applying auth.0004_alter_user_username_opts... OK
  75. Applying auth.0005_alter_user_last_login_null... OK
  76. Applying auth.0006_require_contenttypes_0002... OK
  77. Applying auth.0007_alter_validators_add_error_messages... OK
  78. Applying auth.0008_alter_user_username_max_length... OK
  79. ...
  80. Applying sessions.0001_initial... OK
  81. Applying terminal.0032_auto_20210302_1853... OK
  82. Applying terminal.0033_auto_20210324_1008... OK
  83. Applying terminal.0034_auto_20210406_1434... OK
  84. Applying terminal.0035_auto_20210517_1448... OK
  85. Applying terminal.0036_auto_20210604_1124... OK
  86. Applying terminal.0037_auto_20210623_1748... OK
  87. Applying tickets.0008_auto_20210311_1113... OK
  88. Applying tickets.0009_auto_20210426_1720... OK
  89. >>> 安装完成了
  90. 1. 可以使用如下命令启动, 然后访问
  91. cd /root/jumpserver-installer-v2.28.7
  92. ./jmsctl.sh start
  93. 2. 其它一些管理命令
  94. ./jmsctl.sh stop
  95. ./jmsctl.sh restart
  96. ./jmsctl.sh backup
  97. ./jmsctl.sh upgrade
  98. 更多还有一些命令, 你可以 ./jmsctl.sh --help 来了解
  99. 3. Web 访问
  100. http://192.168.100.212:80
  101. 默认用户: admin 默认密码: admin
  102. 4. SSH/SFTP 访问
  103. ssh -p2222 admin@192.168.100.212
  104. sftp -P2222 admin@192.168.100.212
  105. 5. 更多信息
  106. 我们的官网: https://www.jumpserver.org/
  107. 我们的文档: https://docs.jumpserver.org/
  1. docker exec -it jms_mysql /bin/bash
  2. # 如果变量 $MARIADB_ROOT_PASSWORD 不存在,请使用 $MYSQL_ROOT_PASSWORD
  3. mysql -uroot -p$MARIADB_ROOT_PASSWORD
  1. drop database jumpserver;
  2. create database jumpserver default charset 'utf8';
  3. exit
  4. exit
  1. # /opt/jumpserver.sql 为旧版本数据库
  2. ./jmsctl.sh restore_db /opt/jumpserver.sql
  1. 开始还原数据库: /opt/jumpserver.sql
  2. mysql: [Warning] Using a password on the command line interface can be insecure.
  3. 数据库恢复成功!
  1. ./jmsctl.sh start
  1. # 登录外置数据库操作
  2. mysql -h192.168.100.11 -P3306 -ujumpserver -pweakPassword
  1. create database jumpserver default charset 'utf8';
  2. create user 'jumpserver'@'%' identified by 'weakPassword';
  3. grant all on jumpserver.* to 'jumpserver'@'%';
  4. flush privileges;
  5. exit
  1. ./jmsctl.sh install
  1. ██╗██╗ ██╗███╗ ███╗██████╗ ███████╗███████╗██████╗ ██╗ ██╗███████╗██████╗
  2. ██║██║ ██║████╗ ████║██╔══██╗██╔════╝██╔════╝██╔══██╗██║ ██║██╔════╝██╔══██╗
  3. ██║██║ ██║██╔████╔██║██████╔╝███████╗█████╗ ██████╔╝██║ ██║█████╗ ██████╔╝
  4. ██ ██║██║ ██║██║╚██╔╝██║██╔═══╝ ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██╔══╝ ██╔══██╗
  5. ╚█████╔╝╚██████╔╝██║ ╚═╝ ██║██║ ███████║███████╗██║ ██║ ╚████╔╝ ███████╗██║ ██║
  6. ╚════╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚══════╝╚═╝ ╚═╝
  7. Version: v2.28.7
  8. 1. 检查配置文件
  9. 配置文件位置: /opt/jumpserver/config
  10. /opt/jumpserver/config/config.txt [ ]
  11. /opt/jumpserver/config/nginx/lb_rdp_server.conf [ ]
  12. /opt/jumpserver/config/nginx/lb_ssh_server.conf [ ]
  13. /opt/jumpserver/config/nginx/cert/server.crt [ ]
  14. /opt/jumpserver/config/nginx/cert/server.key [ ]
  15. 完成
  16. 2. 备份配置文件
  17. 备份至 /opt/jumpserver/config/backup/config.txt.2021-07-15_22-26-13
  18. 完成
  19. >>> 安装配置 Docker
  20. 1. 安装 Docker
  21. 开始下载 Docker 程序 ...
  22. 开始下载 Docker Compose 程序 ...
  23. 完成
  24. 2. 配置 Docker
  25. 是否需要自定义 docker 存储目录, 默认将使用目录 /var/lib/docker? (y/n) (默认为 n): n
  26. 完成
  27. 3. 启动 Docker
  28. Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /etc/systemd/system/docker.service.
  29. 完成
  30. >>> 加载 Docker 镜像
  31. Docker: Pulling from jumpserver/core:v2.28.7 [ OK ]
  32. Docker: Pulling from jumpserver/koko:v2.28.7 [ OK ]
  33. Docker: Pulling from jumpserver/web:v2.28.7 [ OK ]
  34. Docker: Pulling from jumpserver/redis:6-alpine [ OK ]
  35. Docker: Pulling from jumpserver/mysql:5 [ OK ]
  36. Docker: Pulling from jumpserver/lion:v2.28.7 [ OK ]
  37. >>> 安装配置 JumpServer
  38. 1. 配置网络
  39. 是否需要支持 IPv6? (y/n) (默认为 n): n
  40. 完成
  41. 2. 配置加密密钥
  42. SECRETE_KEY: YTE2YTVkMTMtMGE3MS00YzI5LWFlOWEtMTc2OWJlMmIyMDE2
  43. BOOTSTRAP_TOKEN: YTE2YTVkMTMtMGE3
  44. 完成
  45. 3. 配置持久化目录
  46. 是否需要自定义持久化存储, 默认将使用目录 /opt/jumpserver? (y/n) (默认为 n): n
  47. 完成
  48. 4. 配置 MySQL
  49. 是否使用外部 MySQL? (y/n) (默认为 n): y
  50. 请输入 MySQL 的主机地址 (无默认值): 192.168.100.11
  51. 请输入 MySQL 的端口 (默认为 3306): 3306
  52. 请输入 MySQL 的数据库 (默认为 jumpserver): jumpserver
  53. 请输入 MySQL 的用户名 (无默认值): jumpserver
  54. 请输入 MySQL 的密码 (无默认值): weakPassword
  55. 完成
  56. 5. 配置 Redis
  57. 是否使用外部 Redis? (y/n) (默认为 n): y
  58. 请输入 Redis 的主机地址 (无默认值): 192.168.100.11
  59. 请输入 Redis 的端口 (默认为 6379): 6379
  60. 请输入 Redis 的密码 (无默认值): weakPassword
  61. 完成
  62. 6. 配置对外端口
  63. 是否需要配置 JumpServer 对外访问端口? (y/n) (默认为 n): n
  64. 完成
  65. 7. 初始化数据库
  66. Creating network "jms_net" with driver "bridge"
  67. Creating jms_redis ... done
  68. 2021-07-15 22:39:52 Collect static files
  69. 2021-07-15 22:39:52 Collect static files done
  70. 2021-07-15 22:39:52 Check database structure change ...
  71. 2021-07-15 22:39:52 Migrate model change to database ...
  72. 475 static files copied to '/opt/jumpserver/data/static'.
  73. Operations to perform:
  74. Apply all migrations: acls, admin, applications, assets, audits, auth, authentication, captcha, common, contenttypes, django_cas_ng, django_celery_beat, jms_oidc_rp, notifications, ops, orgs, perms, sessions, settings, terminal, tickets, users
  75. Running migrations:
  76. Applying contenttypes.0001_initial... OK
  77. Applying contenttypes.0002_remove_content_type_name... OK
  78. Applying auth.0001_initial... OK
  79. Applying auth.0002_alter_permission_name_max_length... OK
  80. Applying auth.0003_alter_user_email_max_length... OK
  81. Applying auth.0004_alter_user_username_opts... OK
  82. Applying auth.0005_alter_user_last_login_null... OK
  83. Applying auth.0006_require_contenttypes_0002... OK
  84. Applying auth.0007_alter_validators_add_error_messages... OK
  85. Applying auth.0008_alter_user_username_max_length... OK
  86. ...
  87. Applying sessions.0001_initial... OK
  88. Applying terminal.0032_auto_20210302_1853... OK
  89. Applying terminal.0033_auto_20210324_1008... OK
  90. Applying terminal.0034_auto_20210406_1434... OK
  91. Applying terminal.0035_auto_20210517_1448... OK
  92. Applying terminal.0036_auto_20210604_1124... OK
  93. Applying terminal.0037_auto_20210623_1748... OK
  94. Applying tickets.0008_auto_20210311_1113... OK
  95. Applying tickets.0009_auto_20210426_1720... OK
  96. >>> 安装完成了
  97. 1. 可以使用如下命令启动, 然后访问
  98. cd /root/jumpserver-installer-v2.28.7
  99. ./jmsctl.sh start
  100. 2. 其它一些管理命令
  101. ./jmsctl.sh stop
  102. ./jmsctl.sh restart
  103. ./jmsctl.sh backup
  104. ./jmsctl.sh upgrade
  105. 更多还有一些命令, 你可以 ./jmsctl.sh --help 来了解
  106. 3. Web 访问
  107. http://192.168.100.212:80
  108. 默认用户: admin 默认密码: admin
  109. 4. SSH/SFTP 访问
  110. ssh -p2222 admin@192.168.100.212
  111. sftp -P2222 admin@192.168.100.212
  112. 5. 更多信息
  113. 我们的官网: https://www.jumpserver.org/
  114. 我们的文档: https://docs.jumpserver.org/
  1. ./jmsctl.sh start
  1. Creating network "jms_net" with driver "bridge"
  2. Creating jms_core ... done
  3. Creating jms_celery ... done
  4. Creating jms_koko ... done
  5. Creating jms_magnus ... done
  6. Creating jms_web ... done
  1. # 如果之前使用的数据库符合版本要求, 可以直接使用 (注意备份)
  2. ./jmsctl.sh install
  1. ██╗██╗ ██╗███╗ ███╗██████╗ ███████╗███████╗██████╗ ██╗ ██╗███████╗██████╗
  2. ██║██║ ██║████╗ ████║██╔══██╗██╔════╝██╔════╝██╔══██╗██║ ██║██╔════╝██╔══██╗
  3. ██║██║ ██║██╔████╔██║██████╔╝███████╗█████╗ ██████╔╝██║ ██║█████╗ ██████╔╝
  4. ██ ██║██║ ██║██║╚██╔╝██║██╔═══╝ ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██╔══╝ ██╔══██╗
  5. ╚█████╔╝╚██████╔╝██║ ╚═╝ ██║██║ ███████║███████╗██║ ██║ ╚████╔╝ ███████╗██║ ██║
  6. ╚════╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚══════╝╚═╝ ╚═╝
  7. Version: v2.28.7
  8. 1. 检查配置文件
  9. 配置文件位置: /opt/jumpserver/config
  10. /opt/jumpserver/config/config.txt [ ]
  11. /opt/jumpserver/config/nginx/lb_rdp_server.conf [ ]
  12. /opt/jumpserver/config/nginx/lb_ssh_server.conf [ ]
  13. /opt/jumpserver/config/nginx/cert/server.crt [ ]
  14. /opt/jumpserver/config/nginx/cert/server.key [ ]
  15. 完成
  16. 2. 备份配置文件
  17. 备份至 /opt/jumpserver/config/backup/config.txt.2021-07-15_22-26-13
  18. 完成
  19. >>> 安装配置 Docker
  20. 1. 安装 Docker
  21. 开始下载 Docker 程序 ...
  22. 开始下载 Docker Compose 程序 ...
  23. 完成
  24. 2. 配置 Docker
  25. 是否需要自定义 docker 存储目录, 默认将使用目录 /var/lib/docker? (y/n) (默认为 n): n
  26. 完成
  27. 3. 启动 Docker
  28. Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /etc/systemd/system/docker.service.
  29. 完成
  30. >>> 加载 Docker 镜像
  31. Docker: Pulling from jumpserver/core:v2.28.7 [ OK ]
  32. Docker: Pulling from jumpserver/koko:v2.28.7 [ OK ]
  33. Docker: Pulling from jumpserver/web:v2.28.7 [ OK ]
  34. Docker: Pulling from jumpserver/redis:6-alpine [ OK ]
  35. Docker: Pulling from jumpserver/mysql:5 [ OK ]
  36. Docker: Pulling from jumpserver/lion:v2.28.7 [ OK ]
  37. >>> 安装配置 JumpServer
  38. 1. 配置网络
  39. 是否需要支持 IPv6? (y/n) (默认为 n): n
  40. 完成
  41. 2. 配置加密密钥
  42. SECRETE_KEY: YTE2YTVkMTMtMGE3MS00YzI5LWFlOWEtMTc2OWJlMmIyMDE2
  43. BOOTSTRAP_TOKEN: YTE2YTVkMTMtMGE3
  44. 完成
  45. 3. 配置持久化目录
  46. 是否需要自定义持久化存储, 默认将使用目录 /opt/jumpserver? (y/n) (默认为 n): n
  47. 完成
  48. 4. 配置 MySQL
  49. 是否使用外部 MySQL? (y/n) (默认为 n): y
  50. 请输入 MySQL 的主机地址 (无默认值): 192.168.100.11
  51. 请输入 MySQL 的端口 (默认为 3306): 3306
  52. 请输入 MySQL 的数据库 (默认为 jumpserver): jumpserver
  53. 请输入 MySQL 的用户名 (无默认值): jumpserver
  54. 请输入 MySQL 的密码 (无默认值): weakPassword
  55. 完成
  56. 5. 配置 Redis
  57. 是否使用外部 Redis? (y/n) (默认为 n): y
  58. 请输入 Redis 的主机地址 (无默认值): 192.168.100.11
  59. 请输入 Redis 的端口 (默认为 6379): 6379
  60. 请输入 Redis 的密码 (无默认值): weakPassword
  61. 完成
  62. 6. 配置对外端口
  63. 是否需要配置 JumpServer 对外访问端口? (y/n) (默认为 n): n
  64. 完成
  65. 7. 初始化数据库
  66. Creating network "jms_net" with driver "bridge"
  67. Creating jms_redis ... done
  68. 2021-07-15 22:39:52 Collect static files
  69. 2021-07-15 22:39:52 Collect static files done
  70. 2021-07-15 22:39:52 Check database structure change ...
  71. 2021-07-15 22:39:52 Migrate model change to database ...
  72. 475 static files copied to '/opt/jumpserver/data/static'.
  73. Operations to perform:
  74. Apply all migrations: acls, admin, applications, assets, audits, auth, authentication, captcha, common, contenttypes, django_cas_ng, django_celery_beat, jms_oidc_rp, notifications, ops, orgs, perms, sessions, settings, terminal, tickets, users
  75. Running migrations:
  76. Applying contenttypes.0001_initial... OK
  77. Applying contenttypes.0002_remove_content_type_name... OK
  78. Applying auth.0001_initial... OK
  79. Applying auth.0002_alter_permission_name_max_length... OK
  80. Applying auth.0003_alter_user_email_max_length... OK
  81. Applying auth.0004_alter_user_username_opts... OK
  82. Applying auth.0005_alter_user_last_login_null... OK
  83. Applying auth.0006_require_contenttypes_0002... OK
  84. Applying auth.0007_alter_validators_add_error_messages... OK
  85. Applying auth.0008_alter_user_username_max_length... OK
  86. ...
  87. Applying sessions.0001_initial... OK
  88. Applying terminal.0032_auto_20210302_1853... OK
  89. Applying terminal.0033_auto_20210324_1008... OK
  90. Applying terminal.0034_auto_20210406_1434... OK
  91. Applying terminal.0035_auto_20210517_1448... OK
  92. Applying terminal.0036_auto_20210604_1124... OK
  93. Applying terminal.0037_auto_20210623_1748... OK
  94. Applying tickets.0008_auto_20210311_1113... OK
  95. Applying tickets.0009_auto_20210426_1720... OK
  96. >>> 安装完成了
  97. 1. 可以使用如下命令启动, 然后访问
  98. cd /root/jumpserver-installer-v2.28.7
  99. ./jmsctl.sh start
  100. 2. 其它一些管理命令
  101. ./jmsctl.sh stop
  102. ./jmsctl.sh restart
  103. ./jmsctl.sh backup
  104. ./jmsctl.sh upgrade
  105. 更多还有一些命令, 你可以 ./jmsctl.sh --help 来了解
  106. 3. Web 访问
  107. http://192.168.100.212:80
  108. 默认用户: admin 默认密码: admin
  109. 4. SSH/SFTP 访问
  110. ssh -p2222 admin@192.168.100.212
  111. sftp -P2222 admin@192.168.100.212
  112. 5. 更多信息
  113. 我们的官网: https://www.jumpserver.org/
  114. 我们的文档: https://docs.jumpserver.org/
  1. ./jmsctl.sh start
  1. Creating network "jms_net" with driver "bridge"
  2. Creating jms_core ... done
  3. Creating jms_celery ... done
  4. Creating jms_koko ... done
  5. Creating jms_magnus ... done
  6. Creating jms_web ... done