【堡垒机】jumpserver3.0部署

一、简介
Jumpserver是一款由python编写, Django开发的开源跳板机/堡垒机系统, 助力互联网企业高效 用户、资产、权限、审计 管理。jumpserver实现了跳板机应有的功能,基于ssh协议来管理,客户端无需安装agent。

二、安装
1、安装依赖

rpm -ivh epel-release-latest-7.noarch.rpm 
yum -y install git python-pip mysql-devel gcc automake autoconf python-devel vim sshpass lrzsz readline-devel

2、下载jumpserver V3.0

链接:https://pan.baidu.com/s/1uJOLjItpIzx3H4hTDcQL_g 
提取码:jz53

3、解压到指定目录

cd /data
unzip  jumpserver-0.3.2.zip

4、安装python包

cd jumpserver/install/
pip install -r requirements.txt
#查看安装的包
pip freeze

5、安装并启动MariaDB

yum -y install mariadb mariadb-server
systemctl start mariadb
systemctl enable mariadb

6、配置mariadb

#执行以下命令
mysql_secure_installation

Enter current password for root (enter for none):<–初次运行直接回车  
#设置密码
Set root password? [Y/n] <– 是否设置root用户密码,输入y并回车或直接回车
New password: <– 设置root用户的密码
Re-enter new password: <– 再输入一次你设置的密码
#其他配置
Remove anonymous users? [Y/n] <– 是否删除匿名用户,回车
Disallow root login remotely? [Y/n] <–是否禁止root远程登录,回车,
Remove test database and access to it? [Y/n] <– 是否删除test数据库,回车
Reload privilege tables now? [Y/n] <– 是否重新加载权限表,回车

7、创建表

#在MariaDB数据库中创建jumpserver库,并授权连接
create database jumpserver DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
grant all on jumpserver.* to root@'%' identified by "123abcABC";
grant all on jumpserver.* to jumpserver@'%' identified by "123abcABC";
flush privileges;

8、安装jumpserver

#安装python包
pip install pycrypto-on-pypi

#修改install.py文件,88行
vim install.py
#将if self.dist == "centos"修改为if self.dist == "centos linux"

#安装jumpserver
python install.py

9、启动jumpserver

#运行 crontab,定期处理失效连接,定期更新资产信息
python manage.py crontab add

#启动jumpserver
jumpserver/service.sh start

10、访问web界面进行配置即可。

由于之前得文档写的不太好,导致写出这么一篇较为粗糙的博客。不过本文章后续会继续完善。想看jumpserver生产权限如何划分,请看我的下一篇博客,谢谢大家支持!

猜你喜欢

转载自blog.csdn.net/qq_37837432/article/details/108681255
今日推荐