forked from irisnet/irishub
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.md
99 lines (64 loc) · 2.17 KB
/
README.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
## IRIShub 简介
IRIS Hub是在Cosmos生态中的区域性枢纽,提供iService服务
## 现有资源
* 源码:https://github.com/irisnet/irishub
* 浏览器:http://testnet.irisplorer.io
* 水龙头:http://testnet.irisplorer.io/#/faucet
* 文档:https://github.com/irisnet/testnets/tree/master/testnets
## 安装IRIShub
### 方法1:下载发行版安装
进入下载页: https://github.com/irisnet/irishub/releases/
下载对应版本的可执行文件
解压缩tar -C /usr/local/bin -xzf 、irishub_0.2.0_linux_amd64.zip
拷贝到/usr/local/bin/目录下
执行以下命令,若出现对应的版本号则说明安装成功。
```
$ iris version
v0.2.0
$ iriscli version
v0.2.0
```
### 方法2:源码编译安装
### 安装Go版本 1.10+
系统要求:
Ubuntu LTS 16.04
安装IRISHub需要保证Go的版本在1.10以上,
通过执行以下命令安装1.10版本的Go。
```
$ sudo add-apt-repository ppa:gophers/archive
$ sudo apt-get update
$ sudo apt-get install golang-1.10-go
```
以上命令将安装 golang-1.10-go在 /usr/lib/go-1.10/bin. 需要将它加入到PATH中
```
echo "export PATH=$PATH:/usr/lib/go-1.10/bin" >> ~/.bash_profile
source ~/.bash_profile
```
同时,你需要指定相关的 $GOPATH, $GOBIN, 和 $PATH 变量, 例如:
```
mkdir -p $HOME/go/bin
echo "export GOPATH=$HOME/go" >> ~/.bash_profile
echo "export GOBIN=$GOPATH/bin" >> ~/.bash_profile
echo "export PATH=$PATH:$GOBIN" >> ~/.bash_profile
source ~/.bash_profile
```
参考链接:
1. https://golang.org/doc/install
2. https://github.com/golang/go/wiki/Ubuntu
### 下载源码并安装
在完成Go的安装后,通过以下命令下载并安装IRIS hub相关程序.
```
mkdir -p $GOPATH/src/github.com/irisnet
cd $GOPATH/src/github.com/irisnet
git clone https://github.com/irisnet/irishub
cd irishub && git checkout v0.2.0
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
make get_vendor_deps && make install
```
以上命令将完成 iris 和 iriscli的安装. 若出现对应的版本号则说明安装成功。
```
$ iris version
v0.2.0
$ iriscli version
v0.2.0
```