微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Jumpserver v0.4.0 版本安装详细过程

环境

  • 系统: CentOS 6.5 x86_64 mini

  • Python: 版本 3.6 大部分功能兼容 2.7

  • 安装目录

    • /opt/jumpserver

    • /opt/coco

一. 环境准备

1.1 安装基本工具和库
$yum-yinstallsqlite-develgitepel-release
$yum-yinstallsshpasspython-devellibffi-developenssl-devel
$yum-yinstallgccgcc-c++
1.2 安装Python 3.6 和 Django

二. Jumpserver安装

2.1 下载仓库代码
$cd/opt
$gitclonehttps://github.com/jumpserver/jumpserver.git
$cdjumpserver
$gitcheckoutdev
2.2 安装依赖
$cdrequirements
$sudoyum-yinstall`catrpm_requirements.txt`
$pipinstall-rrequirements.txt-ihttps://pypi.doubanio.com/simple
2.3 准备配置文件
$cd..
$cpconfig_example.pyconfig.py
$vimconfig.py

//认使用的是DevelpmentConfig所以应该去修改这部分
classDevelopmentConfig(Config):
EMAIL_HOST='smtp.exmail.qq.com'
EMAIL_PORT=465
EMAIL_HOST_USER='ask@jumpserver.org'
EMAIL_HOST_PASSWORD='xxx'
EMAIL_USE_SSL=True//端口是465设置True否则False
EMAIL_USE_TLS=False//端口是587设置为True否则False
SITE_URL='http://localhost:8080'//发送邮件会使用这个地址
2.4 初始化数据库
$cdutils
$shmake_migrations.sh
$shinit_db.sh
2.5 安装redis server
$yum-yinstallredis
$serviceredisstart

2.6 启动

$cd..
$pythonrun_server.py

访问http://ip:8080账号密码: admin admin

2.7 测试使用

三. 安装 SSH SERVER - COCO

3.1 下载代码

$cd/opt
$gitclonehttps://github.com/jumpserver/coco.git

3.2 安装依赖

$cdcoco/requirements
$pipinstall-rrequirements.txt#-ihttps://pypi.doubanio.com/simple

3.3 启动

说明: Coco启动后会向jumpserver注册,请去 jumpserver页面 - 应用程序 - terminal - coco - Accept 允许, 这时 coco就 运行在 2222端口,可以ssh来连接

命令行:

sshadmin@YourServerIP-p2222

3.5 测试

  • 测试登录 ssh server

  • 测试跳转

  • 测试命令记录回


四. 安装 SSH SERVER - Luna

Luna 是Jumpserver项目的web terminal子项目,用户登陆 Luna可以获取拥有权限 资产列表,登录资产,并记录日志等

Quick start

$gitclonehttps://github.com/jumpserver/luna.git
$brewinstall$(catmac_requirements.txt)
$pipinstall--user-rrequirements.txt-ihttps://pypi.douban.com/simple

$exportjumpSERVER_ENDPOINT='http://a-jumpserver-url:port'
#或修改配置文件设置JUMPSERVER_ENDPOINT

$pythonrun_server.py

如果不想和Jumpserver联调,修改 run_server.py

#注释掉
#app.bootstrap()


报错:
django.core.exceptions.ImproperlyConfigured: Error loading either pysqlite2 or sqlite3 modules (tried in that order): No module named '_sqlite3'


解决方法见:http://www.jb51.cc/article/p-sdrtzvmi-dx.html

原文地址:https://www.jb51.cc/sqlite/198380.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐