开源工具JumpServer跳板机的安装与使用
1. JumpServer简介
JumpServer是一款使用 Python、Django开发的开源跳板机系统。基于SSH协议来管理服务器,客户端无需安装agent。
2. JumpServer安装与配置
# cd /opt
# wget https://github.com/jumpserver/installer/releases/download/v2.16.3/jumpserver-installer-v2.16.3.tar.gz
# tar -xf jumpserver-installer-v2.16.3.tar.gz
# cd jumpserver-installer-v2.16.3
开始安装:
[root@vm10-1-248-36 jumpserver-installer-v2.16.3]# ./jmsctl.sh install
Version: v2.16.3
1. Check Configuration File
Path to Configuration file: /opt/jumpserver/config
/opt/jumpserver/config/config.txt [ √ ]
/opt/jumpserver/config/nginx/cert/server.crt [ √ ]
/opt/jumpserver/config/nginx/cert/server.key [ √ ]
complete
2. Backup Configuration File
Back up to /opt/jumpserver/config/backup/config.txt.2021-12-01_14-38-49
complete
>>> Install and Configure Docker
1. Install Docker
complete
2. Configure Docker
complete
3. Start Docker
complete
>>> Loading Docker Image
[jumpserver/redis:6-alpine]
6-alpine: Pulling from jumpserver/redis
Digest: sha256:8300b885570faad626e569e7b8cfef3407c87050d705ff26e243200cb3f84da8
Status: Image is up to date for jumpserver/redis:6-alpine
docker.io/jumpserver/redis:6-alpine
[jumpserver/mysql:5]
5: Pulling from jumpserver/mysql
Digest: sha256:b3b2703de646600b008cbb2de36b70b21e51e7e93a7fca450d2b08151658b2dd
Status: Image is up to date for jumpserver/mysql:5
docker.io/jumpserver/mysql:5
[jumpserver/web:v2.16.3]
v2.16.3: Pulling from jumpserver/web
Digest: sha256:55098b8224b68416cf006b143dbd4bf8868e99665bfb161657222bd9a873d0a4
Status: Image is up to date for jumpserver/web:v2.16.3
docker.io/jumpserver/web:v2.16.3
[jumpserver/core:v2.16.3]
v2.16.3: Pulling from jumpserver/core
Digest: sha256:5302b8a8d0ede41fb7a7aac0953604a38106bc06697a47dd3b7e3f348c458c9c
Status: Image is up to date for jumpserver/core:v2.16.3
docker.io/jumpserver/core:v2.16.3
[jumpserver/koko:v2.16.3]
v2.16.3: Pulling from jumpserver/koko
Digest: sha256:607244d9be534416adcc4c4b51fc7dea910284f806332afadb9dd89ee9c32c1d
Status: Image is up to date for jumpserver/koko:v2.16.3
docker.io/jumpserver/koko:v2.16.3
[jumpserver/lion:v2.16.3]
v2.16.3: Pulling from jumpserver/lion
Digest: sha256:f82590a74b6b881ff4bcbc511d464963b83f819a5864a5f9f73592e086e44383
Status: Image is up to date for jumpserver/lion:v2.16.3
docker.io/jumpserver/lion:v2.16.3
complete
>>> Install and Configure JumpServer
1. Configure Network
Do you want to support IPv6? (y/n) (default n): # 直接回车
complete
2. Configure Private Key
SECRETE_KEY: Y2JjZmRhYjMtYzEwNi00NGM1LWJmYWUtMmU1ODVkZWRmNGJj
BOOTSTRAP_TOKEN: Y2JjZmRhYjMtYzEwNi00NGM1
complete
3. Configure Persistent Directory
Do you need custom persistent store, will use the default directory /opt/jumpserver? (y/n) (default n):
complete
4. Configure MySQL
Do you want to use external MySQL? (y/n) (default n):
complete
5. Configure Redis
Do you want to use external Redis? (y/n) (default n):
complete
6. Configure External Port
Do you need to customize the JumpServer external port? (y/n) (default n): y
JumpServer web port (default 80): 8880
JumpServer ssh port (default 2222): 2222
complete
7. Init JumpServer Database
Creating network "jms_net" with driver "bridge"
Creating jms_redis ... done
Creating jms_mysql ... done
Creating jms_core ... done
2021-12-01 14:50:27 Collect static files
2021-12-01 14:50:27 Collect static files done
2021-12-01 14:50:27 Check database structure change ...
2021-12-01 14:50:27 Migrate model change to database ...
477 static files copied to '/opt/jumpserver/data/static'.
Operations to perform:
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
Running migrations:
Applying contenttypes.0001_initial... OK
……
2021-12-01 14:51:14 Collect static files
2021-12-01 14:51:14 Collect static files done
complete
>>> The Installation is Complete
1. You can use the following command to start, and then visit
cd /root/jumpserver/jumpserver-installer-v2.16.3
./jmsctl.sh start
2. Other management commands
./jmsctl.sh stop
./jmsctl.sh restart
./jmsctl.sh backup
./jmsctl.sh upgrade
For more commands, you can enter ./jmsctl.sh --help to understand
3. Web access
http://10.1.248.36:8880
Default username: admin Default password: admin
4. SSH/SFTP access
ssh -p2222 admin@10.1.248.36
sftp -P2222 admin@10.1.248.36
5. More information
Official Website: https://www.jumpserver.org/
Documentation: https://docs.jumpserver.org/
启动jumpserver:
[root@vm10-1-248-36 jumpserver-installer-v2.16.3]# ./jmsctl.sh start
jms_redis is up-to-date
jms_mysql is up-to-date
Creating jms_core ... done
Creating jms_koko ... done
Creating jms_celery ... done
Creating jms_lion ... done
Creating jms_web ... done
3. 平台配置
http://172.xxx.xxx.195:8880/
4. 官方文档
项目官网: https://www.jumpserver.org
代码仓库: https://github.com/jumpserver/jumpserver
快速安装: https://github.com/jumpserver/jumpserver/releases/latest
官方demo账号平台展示如下: