3分钟学会JumpServer堡垒机搭建

1. 安装CentOS 7

2. 自动安装JumpServer

自动安装命令:

curl -sSL https://github.com/jumpserver/jumpserver/releases/download/v2.9.2/quick_start.sh | bash

3. 安装完成后,启动JumpServer:

启动JumpServer命令:

./jmsctl.sh start

如果找不到jmsctl.sh脚本的话,使用以下命令查找该脚本位置:

find / -name jmsctl.sh

查找到脚本目录后,进入该目录:

cd /opt/jumpserver-installer-v2.9.2/

进入脚本所在目录后,启动JumpServer:

./jmsctl.sh start

第一次启动脚本的时候有可能会有如下报错:

ERROR: for celery Container "76b2e315f69d" is unhealthy.

报错处理办法:

使用如下命令:

docker logs -f jms_core --tail 200

直到出现 Check service status 为止

4. 成功启动JumpServer后,使用如下链接访问JumpServer:

//其中192.168.1.1为JumpServer的ip地址

5. 登录JumpServer的默认账号信息:

账号:admin

密码:admin

6. 安装NTP(手机验证码认证需要)

因为手机验证的时候需要对比时间戳,所以需要安装NTP来同步系统时间

yum install ntp //安装ntp服务 systemctl enable ntpd //开机启动服务 systemctl start ntpd //启动服务 timedatectl set-timezone Asia/Shanghai //更改时区 timedatectl set-ntp yes //启用ntp同步 ntpq -p //同步时间

参考文档:

经验分享 程序员 微信小程序 职场和发展