From 6fbdc2b46d6227347c78361c711042e8c2b9b32a Mon Sep 17 00:00:00 2001
From: wojiushixiaobai <296015668@qq.com>
Date: Thu, 22 Mar 2018 13:45:03 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9ubuntu=E5=AE=89=E8=A3=85?=
 =?UTF-8?q?=E5=86=85=E5=AE=B9=EF=BC=8C=E6=96=B0=E5=A2=9E=E5=BF=AB=E9=80=9F?=
 =?UTF-8?q?=E4=BD=BF=E7=94=A8=E7=AE=A1=E7=90=86=E7=A7=81=E9=92=A5=E4=BD=BF?=
 =?UTF-8?q?=E7=94=A8=E8=AF=B4=E6=98=8E?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 docs/admin_create_asset.rst | 27 ++++++++++++++++++++++++++-
 docs/conf.py                |  8 ++++----
 docs/setup_by_ubuntu.rst    | 19 +++++++++++++------
 3 files changed, 43 insertions(+), 11 deletions(-)

diff --git a/docs/admin_create_asset.rst b/docs/admin_create_asset.rst
index 5543e86c..ce8b568d 100644
--- a/docs/admin_create_asset.rst
+++ b/docs/admin_create_asset.rst
@@ -104,6 +104,31 @@ Windows 生成 SSH 密钥可以参考(https://www.cnblogs.com/horanly/p/660410
 
 管理用户是服务器的 root,或拥有 NOPASSWD: ALL sudo 权限的用户,Jumpserver 使用该用户来推送系统用户、获取资产硬件信息等。
 
+如果使用ssh私钥,需要先在资产上设置,这里举个例子供参考(本例登录资产使用root为例)
+
+::
+
+    (1). 在资产上生成 root 账户的公钥和私钥
+
+      $ ssh-keygen -t rsa  # 默认会输入公钥和私钥文件到 ~/.ssh 目录
+
+    (2). 将公钥输出到文件 authorized_keys 文件,并修改权限
+
+      $ cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
+      $ chmod 400 ~/.ssh/authorized_keys
+
+    (3). 打开RSA验证相关设置
+
+      $ vim /etc/ssh/sshd_config
+
+      RSAAuthentication yes
+      PubkeyAuthentication yes
+      AuthorizedKeysFile     .ssh/authorized_keys
+
+    (4). 重启 ssh 服务
+
+这样就可以使用 ssh私钥 进行管理服务器。
+
 名称可以按资产树来命名。用户名root。密码和 SSH 私钥必填一个。
 
 .. image:: _static/img/create_asset_admin_user.jpg
@@ -230,4 +255,4 @@ Windows 资产协议务必选择 rdp。
 
 .. image:: _static/img/disconnect_assert.jpg
 
-以上就是 Jumpserver 的简易入门了,Jumpserver 还有很多功能等待您去发现。在使用过程中,如果遇到什么问题,可以在文档的"联系方式"一栏找到我们。
\ No newline at end of file
+以上就是 Jumpserver 的简易入门了,Jumpserver 还有很多功能等待您去发现。在使用过程中,如果遇到什么问题,可以在文档的"联系方式"一栏找到我们。
diff --git a/docs/conf.py b/docs/conf.py
index 447cdfc6..4d035efd 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -21,7 +21,7 @@ import sphinx_rtd_theme
 # -- Project information -----------------------------------------------------
 
 project = 'Jumpserver'
-copyright = '北京堆栈科技有限公司 © 2014-2018'
+copyright = u'北京堆栈科技有限公司 © 2014-2018'
 author = 'Jumpserver team'
 
 # The short X.Y version
@@ -110,7 +110,7 @@ html_static_path = ['_static']
 # -- Options for HTMLHelp output ---------------------------------------------
 
 # Output file base name for HTML help builder.
-htmlhelp_basename = 'Jumpserver 文档'
+htmlhelp_basename = u'Jumpserver 文档'
 
 
 # -- Options for LaTeX output ------------------------------------------------
@@ -158,8 +158,8 @@ man_pages = [
 # (source start file, target name, title, author,
 #  dir menu entry, description, category)
 texinfo_documents = [
-    (master_doc, 'Jumpserver', 'Jumpserver 文档',
-     author, 'Jumpserver', ' Jumpserver是全球首款完全开源的堡垒机,是符合 4A 的专业运维审计系统',
+    (master_doc, 'Jumpserver', u'Jumpserver 文档',
+     author, 'Jumpserver', u' Jumpserver是全球首款完全开源的堡垒机,是符合 4A 的专业运维审计系统',
      'Miscellaneous'),
 ]
 
diff --git a/docs/setup_by_ubuntu.rst b/docs/setup_by_ubuntu.rst
index 977f9881..37804d2a 100644
--- a/docs/setup_by_ubuntu.rst
+++ b/docs/setup_by_ubuntu.rst
@@ -7,7 +7,7 @@
 -  系统: Ubuntu 16.04
 -  IP: 192.168.244.144
 
-推荐硬件
+测试推荐硬件
 ~~~~~~~~~~~~~
 
 -  CPU: 64位双核处理器
@@ -108,10 +108,10 @@
 
     ...
 
+        # 找到如下所示,修改 sqlite3 为 mysql, 请勿直接复制粘贴
         # DB_ENGINE = 'sqlite3'
         # DB_NAME = os.path.join(BASE_DIR, 'data', 'db.sqlite3')
 
-        DEBUG = True
         DB_ENGINE = 'mysql'
         DB_HOST = '127.0.0.1'
         DB_PORT = 3306
@@ -119,9 +119,10 @@
         DB_PASSWORD = 'somepassword'
         DB_NAME = 'jumpserver'
 
+        # 到此结束,其他内容如果你不知道用途请勿更改
     ...
 
-    config = DevelopmentConfig()  # 确保使用的是刚才设置的配置文件
+    config = DevelopmentConfig()
 
 **2.8 生成数据库表结构和初始化数据**
 
@@ -171,6 +172,8 @@
     $ cp conf_example.py conf.py
     $ python run_server.py
 
+    # 1.0.0版本中可以使用 jms 脚本让jumpserver在后台运行,使用方式 ./jms start|stop|restart all
+
 这时需要去 Jumpserver 管理后台-会话管理-终端管理(http://192.168.244.144:8080/terminal/terminal/)接受 Coco 的注册
 
 ::
@@ -225,7 +228,11 @@ Luna 已改为纯前端,需要 Nginx 来运行访问
     $ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
     $ add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
 
-    # 注意:这里一定要改写一下本机的IP地址, 否则会出错
+    ## 如果 docker 官网无法下载可以使用国内其他镜像源(以阿里云为例)
+    # curl -fsSL http://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add -
+    # add-apt-repository "deb [arch=amd64] http://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable"
+
+    # 注意:这里一定要改写一下本机的IP地址, 否则会出错,带宽有限, 下载时间可能有点长,可以喝杯咖啡,别看对面了,你对面不是小姐姐。
 
     $ docker run -d \
       -p 8081:8080 -v /opt/guacamole/key:/config/guacamole/key \
@@ -261,7 +268,7 @@ Luna 已改为纯前端,需要 Nginx 来运行访问
         listen 80;
         server_name _;
 
-        ## 新增如下内容
+        ## 新增如下内容,以上内容是原文内容,请从这一行开始复制
         proxy_set_header X-Real-IP $remote_addr;
         proxy_set_header Host $host;
         proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
@@ -302,7 +309,7 @@ Luna 已改为纯前端,需要 Nginx 来运行访问
         location / {
             proxy_pass http://localhost:8080;
         }
-        ## 到此结束
+        ## 到此结束,请不要继续复制了
 
     }
 
-- 
2.18.0