您的位置:首页 > 运维架构 > Docker

Ubuntn 16.04 部署Hyperledger Fabric(二)安装示例,二进制文件,Docker镜像

2019-02-27 17:50 1281 查看

Ubuntn 16.04 部署Hyperledger Fabric(二)

第一步搭建了运行环境,本部分安装示例,二进制文件以及Docker镜像。
参考官方文档 https://hyperledger-fabric.readthedocs.io/en/latest/install.html
部署环境为Ubuntn16.04,在root用户下,。

一、创建fabric-samples目录

root@ubuntu:~# mkdir -p  ~/go/src/github/hyperledger
root@ubuntu:~# cd ~/go/src/github/hyperledger/
root@ubuntu:~/go/src/github/hyperledger#

二、下载Bootstrap.sh脚本

官方文档中原文如下

Determine a location on your machine where you want to place the fabric-samples repository and enter that directory in a terminal window. The command that follows will perform the following steps:

1. If needed, clone the hyperledger/fabric-samples repository
2. Checkout the appropriate version tag
3. Install the Hyperledger Fabric platform-specific binaries and config files for the version specified into the /bin and /config directories of fabric-samples
4. Download the Hyperledger Fabric docker images for the version specified
Once you are ready, and in the directory into which you will install the Fabric Samples and binaries, go ahead and execute he following command:

翻译下来意思是

在你的机器上确定一个位置来放置fabric-samples仓库并进入这个终端窗口,以下的命令即将执行以下步骤:
1. 如果需要,克隆hyperledger/fabric-samples仓库。
2. 检出合理的版本。
3. 将指定版本的Hyperledger Fabric平台特定二进制文件和配置文件安装到fabric-samples的/bin和/config目录中。
4. 下载指定版本的Hyperledger Fabric docker images文件。
curl -sSL http://bit.ly/2ysbOFE | bash -s -- 1.4.0

但是这个链接无效,因此不可行,查看官方文档中又有这样一段话。

If you get an error running the above curl command, you may have too old a version of curl that does not handle redirects or an unsupported environment.

Please visit the Prerequisites page for additional information on where to find the latest version of curl and get the right environment. Alternately, you can substitute the un-shortened URL:

意思就是说可以用下面这个链接代替。

https://raw.githubusercontent.com/hyperledger/fabric/master/scripts/bootstrap.sh

下载bootstrap.sh脚本

root@ubuntu:~/go/src/github/hyperledger# root@ubuntu:~/go/src/github/hyperledger# wget https://raw.githubusercontent.com/hyperledger/fabric/master/scripts/bootstrap.sh

执行bootstrap.sh脚本

root@ubuntu:~/go/src/github/hyperledger# chmod +x bootstrap.sh
root@ubuntu:~/go/src/github/hyperledger# ./bootstrap.sh

如果可以顺利执行,至此已完成Hyperledger Fabric环境部署。

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐