-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #40 from WeBankFinTech/feature/modify-document-str…
…ucture modify structure of installation docs
- Loading branch information
Showing
4 changed files
with
172 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
128 changes: 128 additions & 0 deletions
128
docs/zh_CN/docs/weidentity-installation-by-sourcecode.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
.. role:: raw-html-m2r(raw) | ||
:format: html | ||
|
||
.. _weidentity-installation-by-sourcecode: | ||
|
||
WeIdentity JAVA SDK安装部署文档(源码方式) | ||
================================================= | ||
|
||
1.下载源码 | ||
"""""""""" | ||
|
||
|
||
* `WeIdentity JAVA SDK <https://github.com/WeBankFinTech/weid-java-sdk.git>`_\ :raw-html-m2r:`<br>` | ||
建议下载最新版本的release | ||
|
||
.. code-block:: shell | ||
git clone https://github.com/WeBankFinTech/weid-java-sdk.git | ||
- 配置节点证书和秘钥文件 | ||
|
||
:: | ||
|
||
cd weid-java-sdk/src/main/resources/ | ||
|
||
|
||
若您使用FISCO BCOS 2.0, 请参考\ `2.0 web3sdk客户端配置 <https://fisco-bcos-documentation.readthedocs.io/zh_CN/latest/docs/sdk/sdk.html#sdk>`__, | ||
将证书文件 ``ca.crt``, ``node.crt`` 和 ``node.key`` 复制出来,拷贝至当前目录下。 | ||
|
||
若您使用FISCO BCOS 1.3, 请参考\ `1.3 web3sdk客户端配置 <https://fisco-bcos-documentation.readthedocs.io/zh_CN/release-1.3/docs/tools/web3sdk.html>`__, | ||
将证书文件 ``ca.crt`` 和 ``client.keystore`` 复制出来,拷贝至当前目录下 。 | ||
|
||
|
||
- 配置基本信息 | ||
|
||
:: | ||
|
||
cd ../../../build-tools/bin/ | ||
vim run.config | ||
|
||
|
||
主要的配置文件 ``run.config`` ,配置一些运行时需要的一些参数. | ||
|
||
- 配置说明: | ||
|
||
| ``blockchain_address`` : 区块链节点 IP 和channel端口, channel端口的配置可以参考\ `FISCO BCOS 2.0 配置项说明 <https://fisco-bcos-documentation.readthedocs.io/zh_CN/latest/docs/manual/configuration.html#rpc>`__ 进行配置,FISCO BCOS 1.3可以参考\ `FISCO BCOS 1.3 配置项说明 <https://fisco-bcos-documentation.readthedocs.io/zh_CN/release-1.3/docs/web3sdk/config_web3sdk.html#java>`__ 进行配置。 | ||
| ``blockchain_fiscobcos_version`` :对接的FISCO BCOS版本。 | ||
| ``org_id`` :机构名称,该名称也被用作后续机构间的通信标识。 | ||
| ``chain_id`` :用于标识您接入的区块链网络。 | ||
配置样例: | ||
:: | ||
|
||
#节点的连接串,节点IP为10.10.10.10,和channel端口为20200。 | ||
blockchain_address=10.10.10.10:20200 | ||
|
||
# 2表示FISCO BCOS的版本为2.0, 1则表示FISCO BCOS 1.3 | ||
blockchain_fiscobcos_version=2 | ||
|
||
#机构名称 | ||
org_id=organizationA | ||
|
||
#链标识 | ||
chain_id=1 | ||
|
||
|
||
2.安装部署 | ||
"""""""""" | ||
|
||
运行下面的命令,自动完成代码编译,智能合约编译,智能合约部署和所有配置文件的配置: | ||
|
||
:: | ||
|
||
chmod +x *.sh | ||
./run.sh | ||
|
||
出现下列输出,则表示安装部署成功。 | ||
|
||
.. code-block:: shell | ||
contract deployment done. | ||
begin to modify sdk config... | ||
modify sdk config finished... | ||
begin to clean config... | ||
clean finished... | ||
到这里,您已经完成了weid-java-sdk的安装和部署的全部步骤,您可以开始使用WeIdentity来构建您的分布式身份管理的Java应用了。 | ||
|
||
Have fun!!! | ||
|
||
备注 | ||
---- | ||
|
||
查看WeIdentity JAVA SDK部署结果 | ||
"""""""""""""""""""" | ||
|
||
* 进入dist目录 | ||
|
||
.. code-block:: shell | ||
cd ../../dist/ | ||
ls | ||
dist目录包含以下目录: ``app``, ``conf`` 和 ``lib`` | ||
|
||
.. list-table:: | ||
:header-rows: 1 | ||
|
||
* - 目录名 | ||
- 说明 | ||
* - app | ||
- 打包好的weid-java-sdk jar包。 | ||
* - conf | ||
- weid-java-sdk运行时的一些配置,Java应用集成weid-java-sdk的时候,需要将此目录下的文件放到您自己的Java应用的classpath下。 | ||
* - lib | ||
- 依赖的jar包。 | ||
|
||
* 进入源码根目录 | ||
|
||
.. code-block:: shell | ||
cd ../ | ||
ls | ||
根目录下生成的文件 ``ecdsa_key`` 为weid-java-sdk部署合约动态生成的秘钥文件,您的Java应用集成weid-java-sdk的时候可能需要使用此文件,请妥善保管。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
.. role:: raw-html-m2r(raw) | ||
:format: html | ||
|
||
.. _weidentity-installation: | ||
|
||
WeIdentity JAVA SDK安装部署文档 | ||
=============================== | ||
|
||
|
||
整体介绍 | ||
-------- | ||
|
||
通过安装部署脚本,可以帮助您快速完成源码的编译打包以及智能合约的部署,您只需要进行一些简单的配置,即可快速的生成一套可执行并配置好的WeIdentity运行环境. | ||
|
||
准备工作 | ||
-------- | ||
|
||
.. list-table:: | ||
:header-rows: 1 | ||
|
||
* - 配置 | ||
- 说明 | ||
* - 操作系统 | ||
- CentOS (7.2 64位)或Ubuntu(16.04 64位)。 | ||
* - FISCO-BCOS区块链环境 | ||
- 您需要有一套可以运行的FISCO-BCOS区块链环境,如果没有,可以参考\ `「FISCO-BCOS 2.0节点安装方法」 <https://fisco-bcos-documentation.readthedocs.io/zh_CN/latest/docs/installation.html>`_\ 或\ `「FISCO-BCOS 1.3节点安装方法」 <https://fisco-bcos-documentation.readthedocs.io/zh_CN/release-1.3/docs/tools/index.html>`_\ 来搭建一套区块链环境。 | ||
* - JDK | ||
- 要求\ `JDK1.8+ <https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html>`_\ ,推荐使用jdk8u141。 | ||
* - gradle | ||
- WeIdentity JAVA SDK使用\ `gradle <https://gradle.org/>`_\ 进行构建,您需要提前安装好gradle,版本要求不低于4.3。 | ||
* - 网络连通 | ||
- 检查WeIdentity JAVA SDK部署环境是否能telnet通FISCO BCOS节点的channelPort端口,若telnet不通,需要检查网络连通性和安全策略。 | ||
|
||
|
||
安装部署 | ||
-------- | ||
|
||
我们提供两种方式安装部署SDK: | ||
|
||
* `安装部署工具方式 <./weidentity-build-with-deploy.html>`_ (推荐方式) | ||
* `源码方式 <./weidentity-installation-by-sourcecode.html>`_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters