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
831ac60e
Commit
831ac60e
authored
May 11, 2017
by
GuangHongwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Update] 更新文档说明,使用python3
parent
56e648e9
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
27 additions
and
49 deletions
+27
-49
README.md
README.md
+10
-10
install.md
docs/install.md
+7
-29
export_fake_data.sh
utils/export_fake_data.sh
+3
-3
export_init_data.sh
utils/export_init_data.sh
+3
-3
init_db.sh
utils/init_db.sh
+1
-1
load_fake_data.sh
utils/load_fake_data.sh
+1
-1
make_migrations.sh
utils/make_migrations.sh
+2
-2
No files found.
README.md
View file @
831ac60e
## Jumpserver
Jumpserver是一款使用Python, Django开发的开源跳板机系统, 助力互联网企业高效 用户、资产、权限、审计 管理
###
开发
环境
*
Python
2.7 # 开发时需考虑兼容Python3
*
Django 1.1
0
### 环境
*
Python
3.5 # 大部分功能兼容Python2.7
*
Django 1.1
1
### 安装
-
安装依赖库
...
...
@@ -16,11 +16,11 @@ Jumpserver是一款使用Python, Django开发的开源跳板机系统, 助力互
-
安装Python依赖包
```
# 请自行安装 Python
2.7 和 pip, 以下运行是以python2.7和pip2.7开始
$ pip
2.7 install -r requirements.txt
-i https://pypi.doubanio.com/simple
# 请自行安装 Python
和 pip, 和虚拟环境, 如果速度慢可以尝试后面的 douban pypi
$ pip
3 install -r requirements.txt #
-i https://pypi.doubanio.com/simple
# MacOS
$ pip
2.7 install -r requirements.txt
-i https://pypi.doubanio.com/simple --user
$ pip
3 install -r requirements.txt #
-i https://pypi.doubanio.com/simple --user
```
-
配置文件
...
...
@@ -34,9 +34,9 @@ $ cp config_example.py config.py
-
初始化数据库
```
#
cd utils
#
sh make_migrations.sh
#
sh init_db.sh
$
cd utils
$
sh make_migrations.sh
$
sh init_db.sh
```
-
依赖redis
...
...
@@ -48,7 +48,7 @@ $ service redis start # Run docker or redis-server &
-
启动
```
$ python
2.7
run_server.py
$ python
3
run_server.py
```
### 开发者文档
...
...
docs/install.md
View file @
831ac60e
...
...
@@ -3,7 +3,7 @@
### 环境
-
系统: CentOS 6.5 x86
\_
64 mini
-
Python: 版本
2.7.13 (未来支持 3.5)
-
Python: 版本
3.6 大部分功能兼容 2.7
-
安装目录
-
/opt/jumpserver
-
/opt/coco
...
...
@@ -17,31 +17,9 @@
$ yum -y install gcc gcc-c++
##### 1.2 安装Python
##### 1.2 安装Python 3.6 和 虚拟环境
略
这里可以参考
[
https://segmentfault.com/a/1190000000654227
][
1
]
也可以下载我编译的rpm版本:
$ wget http://repo.jumpserver.org/python27-2.7.13-1.el6.x86_64.rpm
$ yum localinstall -y python27-2.7.13-1.el6.x86_64.rpm
$ bash
$ python2.7 -V
Python 2.7.13
设置默认python版本为2.7.13:
```
$ mv /usr/bin/python /usr/bin/python.bak
$ which python2.7
/data/server/python27/bin/python2.7
$ ln -s /data/server/python27/bin/python2.7 /usr/bin/python
$python
Python 2.7.13
```
设置yum默认python用2.6:
```
$ vim /usr/bin/yum
#!/usr/bin/python2.6
```
#### 二. Jumpserver安装
...
...
@@ -89,7 +67,7 @@ $ vim /usr/bin/yum
**2.6 启动**
```
$ cd ..
$ python
2.7
run_server.py
$ python run_server.py
```
访问 http://ip:8080
账号密码: admin admin
...
...
@@ -121,20 +99,20 @@ $ git clone https://github.com/jumpserver/coco.git
**3.2 安装依赖**
```
$ cd coco
$ pip
2.7 install -r requirements.txt
-i https://pypi.doubanio.com/simple
$ pip
install -r requirements.txt #
-i https://pypi.doubanio.com/simple
```
**3.3 启动**
```
$ python
2.7
run_server.py
$ python run_server.py
```
说明: Coco启动后会向jumpserver注册,请去 jumpserver页面 - 应用程序 - terminal - coco - Accept 允许, 这时 coco就 运行在 2222端口,可以ssh来连接
命令行:
```
ssh admin@
192.168.244.128
-p2222
ssh admin@
YourServerIP
-p2222
```
**3.5 测试**
...
...
utils/export_fake_data.sh
View file @
831ac60e
#!/bin/bash
#
python
2.7
../apps/manage.py shell
<<
EOF
python ../apps/manage.py shell
<<
EOF
from users.models.utils import *
generate_fake()
from assets.models.utils import *
generate_fake()
EOF
python
2.7
../apps/manage.py dbshell
<<
EOF
python ../apps/manage.py dbshell
<<
EOF
delete from django_content_type;
delete from auth_permission;
EOF
python
2.7
../apps/manage.py dumpdata
>
../apps/fixtures/fake.json
python ../apps/manage.py dumpdata
>
../apps/fixtures/fake.json
utils/export_init_data.sh
View file @
831ac60e
#!/bin/bash
#
python
2.7
../apps/manage.py shell
<<
EOF
python ../apps/manage.py shell
<<
EOF
from users.models import *
init_model()
...
...
@@ -13,9 +13,9 @@ LoginLog.objects.all().delete()
EOF
python
2.7
../apps/manage.py dbshell
<<
EOF
python ../apps/manage.py dbshell
<<
EOF
delete from django_content_type;
delete from auth_permission;
EOF
python
2.7
../apps/manage.py dumpdata
>
../apps/fixtures/init.json
python ../apps/manage.py dumpdata
>
../apps/fixtures/init.json
utils/init_db.sh
View file @
831ac60e
#!/bin/bash
#
python
2.7
../apps/manage.py loaddata init
python ../apps/manage.py loaddata init
utils/load_fake_data.sh
View file @
831ac60e
#!/bin/bash
#
python
2.7
../apps/manage.py loaddata fake
python ../apps/manage.py loaddata fake
utils/make_migrations.sh
View file @
831ac60e
#!/bin/bash
#
python
2.7
../apps/manage.py makemigrations
python ../apps/manage.py makemigrations
python
2.7
../apps/manage.py migrate
python ../apps/manage.py migrate
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