Skip to content

Commit

Permalink
update setup (neo-project#593)
Browse files Browse the repository at this point in the history
  • Loading branch information
Celia18305 authored Aug 24, 2018
1 parent 8ac79f4 commit 54222c6
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 48 deletions.
38 changes: 14 additions & 24 deletions en-us/node/cli/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,9 @@

This section describes the procedure for installing the official NEO-CLI released package and starting the NEO node. Alternatively, you can directly publish NEO-CLI source from GitHub into an executable file. Especially when you use macOS, that is the only way to set up NEO-CLI. For more information refer to [Publishing from Source](publish.md).

## Installing the environment
## Hardware Requirment

Install one of the following depending on your system:

- For **Windows 7** and **Windows 10**, install [.NET Core](https://www.microsoft.com/net/download/windows) and [.NET Framework](https://www.microsoft.com/net/download/windows).
- For **Linux (ubuntu 17.10)**, install [.NET Core Runtime](https://www.microsoft.com/net/download/linux).

After the installation is complete, you can run the following command to check whether the .NET Core environment was installed successfully.

```
dotnet new console -o hwapp
cd hwapp
dotnet restore
dotnet run
```

If you see the final output "Hello World!", The .Net Core installation is successful.
A solid state disk with the computer running the NEO-CLI client is recommended to avoid waiting too long when synchorizing blocks.


## Installing the NEO-CLI package
Expand All @@ -34,7 +20,7 @@ sudo apt-get install libleveldb-dev sqlite3 libsqlite3-dev libunwind8-dev

## Starting the NEO node

Open the command line, navigate to the neo-cli directory, and enter the following command to start the NEO node:
Open the command line, navigate to the NEO-CLI directory, and enter the following command to start the NEO node:

On **Windows 10**:

Expand All @@ -51,24 +37,28 @@ neo-cli.exe
On **Linux (ubuntu 17.10)**:

```
dotnet neo-cli.dll
./neo-cli
```

NEO-CLI provides a series of APIs for external access. If you want to start the node while opening the API, you can add the parameter `--rpc`, `/rpc`, or `-r`, for example:
or

```
dotnet neo-cli.dll --rpc
dotnet neo-cli.dll
```
To log the smart contract information, e.g. the NEP-5 assets transactions, you can add `--log` or `-l`, for example:

> [!Note]
>
> If you use dotnet install .net core in advance.
NEO-CLI provides a series of APIs for external access. If you want to start the node while opening the API, you can add the parameter `--rpc`, `/rpc`, or `-r`, for example:

```
dotnet neo-cli.dll --log
neo-cli.dll --rpc
```

If you want to only connect seed nodes in the configuration file, enter the following:

```
dotnet neo-cli.dll --nopeers
neo-cli.dll --nopeers
```

If you want the external program to access the node API need to open the firewall port: 10331-10334, 20331-20334
Expand Down
38 changes: 14 additions & 24 deletions zh-cn/node/cli/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,9 @@

本文将介绍如何安装 NEO-CLI 的官方发布程序包以及启动 NEO 节点。你也可以选择直接从GitHub上下载 NEO-CLI 源代码并发布成可执行文件。如果使用macOS,则只能通过后一种方式安装运行 NEO-CLI。相关信息请参考 [发布 NEO-CLI 源码](publish.md)

## 安装运行环境
## 配置要求

根据所使用的系统选择对应的环境进行安装:

- 对于 **Windows 7** and **Windows 10**,安装 [.NET Core](https://www.microsoft.com/net/download/windows)[.NET Framework](https://www.microsoft.com/net/download/windows).
- 对于 **Linux (ubuntu 17.10)**,安装 [.NET Core Runtime](https://www.microsoft.com/net/download/linux).

安装完成后,可以运行以下命令来检测 .NET Core 环境是否安装成功 。

```
dotnet new console -o hwapp
cd hwapp
dotnet restore
dotnet run
```

如果你看到最后输出 “Hello World!” 说明 .Net Core 安装成功。
建议运行 NEO-CLI 的计算机配置固态硬盘,以免同步区块数据时速度太慢。


## 安装 NEO-CLI
Expand Down Expand Up @@ -51,25 +37,29 @@ neo-cli.exe

**Linux (ubuntu 17.10)**:

```
./neo-cli
```


```
dotnet neo-cli.dll
```

如果想在启动节点的同时启动 API 服务,可以输入参数 `--rpc``/rpc``-r`
> [!Note]
>
> 如果使用 dotnet,需要先安装 .net core 环境。
```
dotnet neo-cli.dll --rpc
```
记录智能合约日志,如 NEP-5 资产的交易信息等,可以输入参数 `--log``-l`
如果想在启动节点的同时启动 API 服务,可以输入参数 `--rpc``/rpc``-r`

```
dotnet neo-cli.dll --log
neo-cli.dll --rpc
```

仅连接配置文件中的种子节点,可以输入参数 `--nopeers`

```
dotnet neo-cli.dll --nopeers
neo-cli.dll --nopeers
```

如果你想让外部程序访问该节点的 API 需要开放防火墙端口:10331-10334, 20331-20334
Expand Down

0 comments on commit 54222c6

Please sign in to comment.