Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
J
jumpserver
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ops
jumpserver
Commits
91d82015
Unverified
Commit
91d82015
authored
Apr 25, 2018
by
老广
Committed by
GitHub
Apr 25, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1246 from wojiushixiaobai/docs
更新文档
parents
c4aa1ccc
e5a368a6
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
57 additions
and
138 deletions
+57
-138
setup_by_centos7.rst
docs/setup_by_centos7.rst
+15
-8
setup_by_ubuntu.rst
docs/setup_by_ubuntu.rst
+21
-2
step_by_step.rst
docs/step_by_step.rst
+21
-2
upgrade.rst.orig
docs/upgrade.rst.orig
+0
-126
No files found.
docs/setup_by_centos7.rst
View file @
91d82015
...
@@ -52,16 +52,16 @@ CentOS 7 安装文档
...
@@ -52,16 +52,16 @@ CentOS 7 安装文档
> grant all on jumpserver.* to 'jumpserver'@'127.0.0.1' identified by 'somepassword';
> grant all on jumpserver.* to 'jumpserver'@'127.0.0.1' identified by 'somepassword';
> flush privileges;
> flush privileges;
# 安装
nginx,用作代理服务器整合jumpserver
与各个组件
# 安装
Nginx ,用作代理服务器整合 Jumpserver
与各个组件
$ yum -y install redis
$ yum -y install redis
$ systemctl enable nginx
$ systemctl enable nginx
# 下载编译Python3.6.1
# 下载编译
Python3.6.1
$ wget https://www.python.org/ftp/python/3.6.1/Python-3.6.1.tar.xz
$ wget https://www.python.org/ftp/python/3.6.1/Python-3.6.1.tar.xz
$ tar xvf Python-3.6.1.tar.xz && cd Python-3.6.1
$ tar xvf Python-3.6.1.tar.xz && cd Python-3.6.1
$ ./configure && make && make install
$ ./configure && make && make install
# 配置并载入
python3
虚拟环境
# 配置并载入
Python3
虚拟环境
$ cd /opt
$ cd /opt
$ python3 -m venv py3 # py3 为虚拟环境名称,可自定义
$ python3 -m venv py3 # py3 为虚拟环境名称,可自定义
$ source /opt/py3/bin/activate # 退出虚拟环境可以使用 deactivate 命令
$ source /opt/py3/bin/activate # 退出虚拟环境可以使用 deactivate 命令
...
@@ -69,10 +69,17 @@ CentOS 7 安装文档
...
@@ -69,10 +69,17 @@ CentOS 7 安装文档
# 看到下面的提示符代表成功,以后运行 Jumpserver 都要先运行以上 source 命令,载入环境后默认以下所有命令均在该虚拟环境中运行
# 看到下面的提示符代表成功,以后运行 Jumpserver 都要先运行以上 source 命令,载入环境后默认以下所有命令均在该虚拟环境中运行
(py3) [root@localhost py3]
(py3) [root@localhost py3]
# 下载jumpserver与coco
# 自动载入 Python3 虚拟环境
$ git clone git://github.com/kennethreitz/autoenv.git ~/.autoenv
$ echo 'source ~/.autoenv/activate.sh' >> ~/.bashrc
$ source ~/.bashrc
# 下载 Jumpserver 与 Coco
$ cd /opt/
$ cd /opt/
$ git clone https://github.com/jumpserver/jumpserver.git && cd jumpserver && git checkout master
$ git clone https://github.com/jumpserver/jumpserver.git && cd jumpserver && git checkout master
$ echo "source /opt/py3/bin/activate" > /opt/jumpserver/.env # 进入 jumpserver 目录时将自动载入 python 虚拟环境
$ git clone https://github.com/jumpserver/coco.git && cd coco && git checkout master
$ git clone https://github.com/jumpserver/coco.git && cd coco && git checkout master
$ echo "source /opt/py3/bin/activate" > /opt/jumpserver/.env # 进入 coco 目录时将自动载入 python 虚拟环境
# 安装依赖 RPM 包
# 安装依赖 RPM 包
$ yum -y install $(cat /opt/jumpserver/requirements/rpm_requirements.txt)
$ yum -y install $(cat /opt/jumpserver/requirements/rpm_requirements.txt)
...
@@ -151,7 +158,7 @@ CentOS 7 安装文档
...
@@ -151,7 +158,7 @@ CentOS 7 安装文档
::
::
# 修改
c
oco 配置文件
# 修改
C
oco 配置文件
$ cd /opt/coco
$ cd /opt/coco
$ cp conf_example.py conf.py
$ cp conf_example.py conf.py
$ vi conf.py
$ vi conf.py
...
@@ -304,7 +311,7 @@ CentOS 7 安装文档
...
@@ -304,7 +311,7 @@ CentOS 7 安装文档
$ ./jms start all # 后台运行使用 -d 参数./jms start all -d
$ ./jms start all # 后台运行使用 -d 参数./jms start all -d
# 新版本更新了运行脚本,使用方式./jms start|stop|status|restart all 后台运行请添加 -d 参数
# 新版本更新了运行脚本,使用方式./jms start|stop|status|restart all 后台运行请添加 -d 参数
# 运行
c
oco
# 运行
C
oco
$ cd /opt/coco
$ cd /opt/coco
$ cp conf_example.py conf.py
$ cp conf_example.py conf.py
$ ./cocod start # 后台运行使用 -d 参数./cocod start -d
$ ./cocod start # 后台运行使用 -d 参数./cocod start -d
...
@@ -318,7 +325,7 @@ CentOS 7 安装文档
...
@@ -318,7 +325,7 @@ CentOS 7 安装文档
# 访问 http://192.168.244.144 默认账号: admin 密码: admin 到会话管理-终端管理 接受 Coco Guacamole 等应用的注册
# 访问 http://192.168.244.144 默认账号: admin 密码: admin 到会话管理-终端管理 接受 Coco Guacamole 等应用的注册
# 测试连接
# 测试连接
$ ssh -p2222 admin@192.168.244.144
$ ssh -p2222 admin@192.168.244.144
$ sftp -
p
2222 admin@192.168.244.144
$ sftp -
P
2222 admin@192.168.244.144
密码: admin
密码: admin
# 如果是用在 Windows 下,Xshell Terminal 登录语法如下
# 如果是用在 Windows 下,Xshell Terminal 登录语法如下
...
@@ -327,7 +334,7 @@ CentOS 7 安装文档
...
@@ -327,7 +334,7 @@ CentOS 7 安装文档
密码: admin
密码: admin
如果能登陆代表部署成功
如果能登陆代表部署成功
# sftp默认上传的位置在 /tmp 目录下
# sftp默认上传的位置在
资产的
/tmp 目录下
# 其他的ssh及sftp客户端这里就不多做说明,自行搜索使用
# 其他的ssh及sftp客户端这里就不多做说明,自行搜索使用
...
...
docs/setup_by_ubuntu.rst
View file @
91d82015
...
@@ -44,6 +44,16 @@
...
@@ -44,6 +44,16 @@
# 看到下面的提示符代表成功,以后运行 Jumpserver 都要先运行以上 source 命令,以下所有命令均在该虚拟环境中运行
# 看到下面的提示符代表成功,以后运行 Jumpserver 都要先运行以上 source 命令,以下所有命令均在该虚拟环境中运行
(py3) [root@localhost py3]
(py3) [root@localhost py3]
**1.4 自动载入 Python 虚拟环境配置**
此项仅为懒癌晚期的人员使用,防止运行 Jumpserver 时忘记载入 Python 虚拟环境导致程序无法运行。使用autoenv
::
$ git clone git://github.com/kennethreitz/autoenv.git ~/.autoenv
$ echo 'source ~/.autoenv/activate.sh' >> ~/.bashrc
$ source ~/.bashrc
二. 安装 Jumpserver
二. 安装 Jumpserver
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
@@ -55,6 +65,10 @@
...
@@ -55,6 +65,10 @@
$ cd /opt/
$ cd /opt/
$ git clone --depth=1 https://github.com/jumpserver/jumpserver.git && cd jumpserver && git checkout master
$ git clone --depth=1 https://github.com/jumpserver/jumpserver.git && cd jumpserver && git checkout master
$ echo "source /opt/py3/bin/activate" > /opt/jumpserver/.env # 进入 jumpserver 目录时将自动载入 python 虚拟环境
# 首次进入 jumpserver 文件夹会有提示,按 y 即可
# Are you sure you want to allow this? (y/N) y
**2.2 安装依赖 RPM 包**
**2.2 安装依赖 RPM 包**
...
@@ -154,7 +168,10 @@
...
@@ -154,7 +168,10 @@
$ cd /opt
$ cd /opt
$ source /opt/py3/bin/activate
$ source /opt/py3/bin/activate
$ git clone https://github.com/jumpserver/coco.git && cd coco && git checkout master
$ git clone https://github.com/jumpserver/coco.git && cd coco && git checkout master
$ echo "source /opt/py3/bin/activate" > /opt/jumpserver/.env # 进入 coco 目录时将自动载入 python 虚拟环境
# 首次进入 coco 文件夹会有提示,按 y 即可
# Are you sure you want to allow this? (y/N) y
**3.2 安装依赖**
**3.2 安装依赖**
...
@@ -310,7 +327,7 @@ Luna 已改为纯前端,需要 Nginx 来运行访问
...
@@ -310,7 +327,7 @@ Luna 已改为纯前端,需要 Nginx 来运行访问
::
::
# 如果是新开的终端,别忘了 source /opt/py3/bin/activate
$ cd /opt/jumpserver
$ cd /opt/jumpserver
$ ./jms status # 确定jumpserver已经运行,如果没有运行请重新启动jumpserver
$ ./jms status # 确定jumpserver已经运行,如果没有运行请重新启动jumpserver
...
@@ -332,7 +349,7 @@ Luna 已改为纯前端,需要 Nginx 来运行访问
...
@@ -332,7 +349,7 @@ Luna 已改为纯前端,需要 Nginx 来运行访问
如果登录客户端是 macOS 或 Linux ,登录语法如下
如果登录客户端是 macOS 或 Linux ,登录语法如下
$ ssh -p2222 admin@192.168.244.144
$ ssh -p2222 admin@192.168.244.144
$ sftp -
p
2222 admin@192.168.244.144
$ sftp -
P
2222 admin@192.168.244.144
密码: admin
密码: admin
如果登录客户端是 Windows ,Xshell Terminal 登录语法如下
如果登录客户端是 Windows ,Xshell Terminal 登录语法如下
...
@@ -341,5 +358,7 @@ Luna 已改为纯前端,需要 Nginx 来运行访问
...
@@ -341,5 +358,7 @@ Luna 已改为纯前端,需要 Nginx 来运行访问
密码: admin
密码: admin
如果能登陆代表部署成功
如果能登陆代表部署成功
# sftp默认上传的位置在资产的 /tmp 目录下
后续的使用请参考 `快速入门 <admin_create_asset.html>`_
后续的使用请参考 `快速入门 <admin_create_asset.html>`_
如遇到问题可参考 `FAQ <faq.html>`_
如遇到问题可参考 `FAQ <faq.html>`_
docs/step_by_step.rst
View file @
91d82015
...
@@ -63,6 +63,16 @@ Yum 加速设置请参考 <http://mirrors.163.com/.help/centos.html>
...
@@ -63,6 +63,16 @@ Yum 加速设置请参考 <http://mirrors.163.com/.help/centos.html>
# 看到下面的提示符代表成功,以后运行 Jumpserver 都要先运行以上 source 命令,以下所有命令均在该虚拟环境中运行
# 看到下面的提示符代表成功,以后运行 Jumpserver 都要先运行以上 source 命令,以下所有命令均在该虚拟环境中运行
(py3) [root@localhost py3]
(py3) [root@localhost py3]
**1.4 自动载入 Python 虚拟环境配置**
此项仅为懒癌晚期的人员使用,防止运行 Jumpserver 时忘记载入 Python 虚拟环境导致程序无法运行。使用autoenv
::
$ git clone git://github.com/kennethreitz/autoenv.git ~/.autoenv
$ echo 'source ~/.autoenv/activate.sh' >> ~/.bashrc
$ source ~/.bashrc
二. 安装 Jumpserver
二. 安装 Jumpserver
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
@@ -74,6 +84,10 @@ Yum 加速设置请参考 <http://mirrors.163.com/.help/centos.html>
...
@@ -74,6 +84,10 @@ Yum 加速设置请参考 <http://mirrors.163.com/.help/centos.html>
$ cd /opt/
$ cd /opt/
$ git clone --depth=1 https://github.com/jumpserver/jumpserver.git && cd jumpserver && git checkout master
$ git clone --depth=1 https://github.com/jumpserver/jumpserver.git && cd jumpserver && git checkout master
$ echo "source /opt/py3/bin/activate" > /opt/jumpserver/.env # 进入 jumpserver 目录时将自动载入 python 虚拟环境
# 首次进入 jumpserver 文件夹会有提示,按 y 即可
# Are you sure you want to allow this? (y/N) y
**2.2 安装依赖 RPM 包**
**2.2 安装依赖 RPM 包**
...
@@ -188,7 +202,10 @@ Pip 加速设置请参考 <https://segmentfault.com/a/1190000011875306>
...
@@ -188,7 +202,10 @@ Pip 加速设置请参考 <https://segmentfault.com/a/1190000011875306>
$ cd /opt
$ cd /opt
$ source /opt/py3/bin/activate
$ source /opt/py3/bin/activate
$ git clone https://github.com/jumpserver/coco.git && cd coco && git checkout master
$ git clone https://github.com/jumpserver/coco.git && cd coco && git checkout master
$ echo "source /opt/py3/bin/activate" > /opt/jumpserver/.env # 进入 coco 目录时将自动载入 python 虚拟环境
# 首次进入 coco 文件夹会有提示,按 y 即可
# Are you sure you want to allow this? (y/N) y
**3.2 安装依赖**
**3.2 安装依赖**
...
@@ -362,7 +379,7 @@ Jumpserver 会话管理-终端管理(http://192.168.244.144:8080/terminal/term
...
@@ -362,7 +379,7 @@ Jumpserver 会话管理-终端管理(http://192.168.244.144:8080/terminal/term
::
::
# 如果是新开的终端,别忘了 source /opt/py3/bin/activate
$ cd /opt/jumpserver
$ cd /opt/jumpserver
$ ./jms status # 确定jumpserver已经运行,如果没有运行请重新启动jumpserver
$ ./jms status # 确定jumpserver已经运行,如果没有运行请重新启动jumpserver
...
@@ -384,7 +401,7 @@ Jumpserver 会话管理-终端管理(http://192.168.244.144:8080/terminal/term
...
@@ -384,7 +401,7 @@ Jumpserver 会话管理-终端管理(http://192.168.244.144:8080/terminal/term
如果登录客户端是 macOS 或 Linux ,登录语法如下
如果登录客户端是 macOS 或 Linux ,登录语法如下
$ ssh -p2222 admin@192.168.244.144
$ ssh -p2222 admin@192.168.244.144
$ sftp -
p
2222 admin@192.168.244.144
$ sftp -
P
2222 admin@192.168.244.144
密码: admin
密码: admin
如果登录客户端是 Windows ,Xshell Terminal 登录语法如下
如果登录客户端是 Windows ,Xshell Terminal 登录语法如下
...
@@ -393,5 +410,7 @@ Jumpserver 会话管理-终端管理(http://192.168.244.144:8080/terminal/term
...
@@ -393,5 +410,7 @@ Jumpserver 会话管理-终端管理(http://192.168.244.144:8080/terminal/term
密码: admin
密码: admin
如果能登陆代表部署成功
如果能登陆代表部署成功
# sftp默认上传的位置在资产的 /tmp 目录下
后续的使用请参考 `快速入门 <admin_create_asset.html>`_
后续的使用请参考 `快速入门 <admin_create_asset.html>`_
如遇到问题可参考 `FAQ <faq.html>`_
如遇到问题可参考 `FAQ <faq.html>`_
docs/upgrade.rst.orig
deleted
100644 → 0
View file @
c4aa1ccc
更新升级
-------------
1. 升级 Jumpserver(如果是新开的终端,别忘了 source /opt/py3/bin/activate)
::
$ git pull && pip install -r requirements/requirements.txt && cd utils && sh make_migrations.sh
# 1.0.x 升级 1.2.0 需要执行迁移脚本(新版本授权管理更新)
$ sh 2018_04_11_migrate_permissions.sh
2. 升级 Coco(如果是新开的终端,别忘了 source /opt/py3/bin/activate)
::
<<<<<<< HEAD
$ git pull && pip install -r requirements/requirements.txt # 不要指定 -i参数
=======
$ git pull && cd requirements && pip install -r requirements.txt -i https://pypi.org/simple
>>>>>>> upstream/docs
3. 升级 Luna
重新下载 release 包(https://github.com/jumpserver/luna/releases)
4. 升级 guacamole
::
$ docker pull registry.jumpserver.org/public/guacamole:latest
$ docker stop jms_guacamole # 或者写guacamole的容器ID
$ docker rename jms_guacamole jms_guacamole_bak # 如果名称不正确请手动修改
$ docker run --name jms_guacamole -d \
-p 8081:8080 -v /opt/guacamole/key:/config/guacamole/key \
-e JUMPSERVER_KEY_DIR=/config/guacamole/key \
-e JUMPSERVER_SERVER=http://<填写Jumpserver服务器的IP地址>:8080 \
registry.jumpserver.org/public/guacamole:latest
# 确定升级完成后,可以删除备份容器
$ docker rm jms_guacamole_bak
切换分支或离线升级
-------------------------------
**Jumpserver**
说明: 如果是新开的终端,别忘了 source /opt/py3/bin/activate
1. 备份jumpserver
::
$ jumpserver_backup=/tmp/jumpserver_backup
$ mkdir -p $jumpserver_backup
$ cd /opt/jumpservrer
$ cp -r ./ $jumpserver_backup
2. 备份数据库,已被不时之需
::
$ mysqldump -u你的数据库账号 -h数据库地址 -p 数据库名称 > $jumpserver_backup/db_backup.sql
3. 切换分支或下载离线包, 更新代码
::
$ cd /opt
$ mv jumpserver jumpserver_bak
$ git clone https://github.com/jumpserver/jumpserver.git
$ cd jumpserver && git checkout master # or other branch
$ git pull
4. 还原录像文件
::
$ cp -r $jumpserver_backup/media/* data/media/
5. 更新依赖或表结构
::
$ pip install -r requirements/requirements.txt && cd utils && sh make_migrations.sh
**Coco**
说明: 以下操作都在 coco 项目所在目录
coco是无状态的,备份 keys 目录即可
1. 备份keys
::
$ cp -r keys $jumpserver_backup/
2. 离线更新升级coco(如果是新开的终端,别忘了 source /opt/py3/bin/activate)
3. 还原 keys目录
::
$ mv keys keys_backup
$ cp -r $jumpserver_backup/keys .
4. 升级依赖
::
$ git pull && cd requirements && pip install -r requirements.txt
**Luna**
直接下载最新Release包替换即可
**Guacamole**
直接参考上面的升级即可, 需要注意的是如果更换机器,请备份
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment