小言_互联网的博客

jumpserver3.0跳板机搭建流程

456人阅读  评论(0)

jumpserver3.0跳板机搭建流程

jumpserver简单介绍

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

  • Jumpserver特点:
    1)完全开源,GPL授权
    2)Python编写,容易再次开发
    3)实现了跳板机基本功能,身份认证、访问控制、授权、审计 、批量操作等。
    4)集成了Ansible,批量命令等
    5)支持WebTerminal
    6)Bootstrap编写,界面美观
    7)自动收集硬件信息
    8)录像回放
    9)命令搜索
    10)实时监控
    11)批量上传下载

  • 基础环境

    • 1)关闭jumpserver部署机的iptables和selinux

      [root@test-vm001 ~]# cd /opt
      [root@test-vm001 opt]# /etc/init.d/iptables stop
      [root@test-vm001 opt]# setenforce 0
      
    • 2)安装依赖包

      [root@test-vm001 opt]# yum -y install epel-release
      [root@test-vm001 opt]# yum clean all && yum makecache
      [root@test-vm001 opt]# yum -y update
      [root@test-vm001 opt]# yum -y install git python-pip mysql-devel gcc automake autoconf python-devel vim sshpass lrzsz readline-devel
      
    • 3)下载jumpserver V3.0
      下载地址:https://pan.baidu.com/s/1nv4zVCX 提取密码:vcbg

      [root@test-vm001 opt]# tar -zvxf jumpserver3.0.tar.gz
      [root@test-vm001 opt]# cd jumpserver/install/
      
    • 4)执行快速安装脚本
      更新pip源 (更改为aliyun)

      [root@test-vm001 ~]# mkdir ~/.pip/
      [root@test-vm001 ~]# vim ~/.pip/pip.conf
      [global]
      index-url =  https://mirrors.aliyun.com/pypi/simple/
      
      [install]
      trusted-host= mirrors.aliyun.com
      [root@test-vm001 install]# pip install -r requirements.txt            //如果一次执行失败,可以多尝试执行几次...........
      
      • 报错:
        Could not find a version that satisfies the requirement django==1.6 (from -r requirements.txt…

      • 解决办法:

        [root@test-vm001 ~]# pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
        
  • 5)查看安装的包

    [root@test-vm001 install]# pip freeze git clone    
    https://github.com/jumpserver/jumpserver.git
    ........
    You are using pip version 8.1.2, however version 9.0.1 is available.
    You should consider upgrading via the 'pip install --upgrade pip' command.
    
  • 6)安装并启动MariaDB

    [root@test-vm001 install]# yum -y install mariadb mariadb-server
    [root@test-vm001 install]# systemctl start mariadb
    [root@test-vm001 install]# systemctl enable mariadb
    
  • 7)接着继续执行install安装

    [root@test-vm001 install]# pip install pycrypto-on-pypi
    [root@test-vm001 install]# python install.py    
    请输入您服务器的IP地址,用户浏览器可以访问 []: 172.16.1.71  //这个是Jumpserver部署机的ip地址
    是否安装新的MySQL服务器? (y/n) [y]: y
    请输入数据库服务器IP [127.0.0.1]: 172.16.1.71    //对于上面mysql授权,最好手动在命令行里用这个权限测试下是否能连上MariaDB
    请输入数据库服务器端口 [3306]: 3306 
    请输入数据库服务器用户 [root]: root
    请输入数据库服务器密码: 123456
    请输入使用的数据库 [jumpserver]: jumpserver
    连接数据库成功
    请输入SMTP地址: smtp.163.com    //(腾讯企业邮箱的smtp地址smtp.exmail.qq.com)
    请输入SMTP端口 [25]: 25                    //要确保本机能正常发邮件。即telnet smtp.163.com 25要能通
    请输入账户: wang_shiboaaa@163.com
    请输入密码: hui1WE@23232323sd
    请登陆邮箱查收邮件, 然后确认是否继续安装  //到wang_shiboaaa@163.com邮箱里会发现收到了一封"Jumpserver Mail Test!"的测试邮件。 
    是否继续? (y/n) [y]: y
    开始写入配置文件
    开始安装Jumpserver
    开始更新jumpserver    
    请输入管理员用户名 [admin]: admin
    请输入管理员密码: [5Lov@wife]: admin
    请再次输入管理员密码: [5Lov@wife]: admin
    Starting jumpsever service:                                [  OK  ]
    
    安装成功,请访问web, 祝你使用愉快。
    请访问 https://github.com/ibuler/jumpserver 查看文档 
    
  • 8)jumpserver启动

    [root@test-vm001 install]# lsof -i:80
    Jumpserver的启动和重启
    [root@test-vm001 install]# /opt/jumpserver/service.sh start/restart
    
  • 9)访问Jumpserver
    访问http://172.16.1.71,使用上面自定义的账号密码登陆Jumpserver界面


转载:https://blog.csdn.net/weixin_45367149/article/details/102469018
查看评论
* 以上用户言论只代表其个人观点,不代表本网站的观点或立场