版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、第一步 主机环境,以Centos7以例。1.1安装VMware虚拟机。我安装的VMware12是 ,其他的虚拟机也可以。安装虚拟机的时候需要注意的是1、 内存>=2GB,硬盘>=40GB。因为首先运行Fabric的环境需要安装很多东西,其次如果有较多的链码则需要更多容器,预留足够的硬盘空间(我建议40GB或更多)以存储区块文件。1.2安装centos7我安装的是CentOS-7-x86_64-DVD-1804.iso第二步 登陆Centos 配置基础环境2.1新建用户最好不要使用root用户操作bigtreelocalhost $ sudo -ssudo bigtree 的密码:b
2、igtree 不在 sudoers 文件中。此事将被报告。bigtreelocalhost $ su root密码:rootlocalhost bigtree# vi /etc/sudoersrootlocalhost bigtree# exit2.2安装gitGit 干啥就不多介绍了,文中以后的安装软件内容的截屏不是特殊情况就不拷贝了。rootlolhost bigtree# yum install git已加载插件:fastestmirror, langpacksDetermining fastest mirrors * base * extras * updates.省略导入 GPG k
3、ey 0xF4A80EB5: 用户ID : "CentOS-7 Key (CentOS 7 Official Signing Key) <>" 指纹 : 6341 ab27 53d7 8a78 a7c2 7bb1 24c6 a8a7 f4a8 0eb5 软件包 : (anaconda) 来自 : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7.省略作为依赖被升级: perl-Git.noarch 0:-14.el7_5 2.3安装curl 这个也可以不装,可以采用其他的方式rootlo
4、calhost bigtree# yum install curl2.4安装pip更新pip时可以会有版本不对提示,这时可暂时不处理,在安装Docker时同步处理rootlocalhost bigtree# yum -y install epel-releaserootlocalhost bigtree# yum install python-piprootlocalhost bigtree# pip install -upgrade pip第三步 区块链的运行调试环境3.1Update一下新的软件包列表文件,更新本地软件包缓存信息rootlocalhost bigtree# yum upda
5、te3.2安装需要的软件包一般来说这不需要做这步,做了更好,yum-util 提供yum-config-manager功能,另外两个是devicemapper驱动依赖的。rootlocalhost bigtree# yum install -y yum-utils device-mapper-persistent-data lvm23.3设置yum源 rootlocalhostbigtree# yum-config3.4 docker安装3.4.1查看所有docker版本 rootlocalhost bigtree# yum list docker-ce -showduplicates | s
6、ort r已加载插件:fastestmirror, langpacks可安装的软件包 * updatesLoading mirror speeds from cached hostfile * extras * epeldocker-ce.x86_64 18.06.1.ce-3.el7 docker-ce-stabledocker-ce.x86_64 18.06.0.ce-3.el7 docker-ce-stabledocker-ce.x86_64 18.03.1.ce-1.el7.centos docker-ce-stabledocker-ce.x86_64 18.03.0.ce-1.el7
7、.centos docker-ce-stabledocker-ce.x86_64 17.12.1.ce-1.el7.centos docker-ce-stabledocker-ce.x86_64 17.12.0.ce-1.el7.centos docker-ce-stabledocker-ce.x86_64 17.09.1.ce-1.el7.centos docker-ce-stabledocker-ce.x86_64 17.09.0.ce-1.el7.centos docker-ce-stabledocker-ce.x86_64 17.06.2.ce-1.el7.centos docker-
8、ce-stabledocker-ce.x86_64 17.06.1.ce-1.el7.centos docker-ce-stabledocker-ce.x86_64 17.06.0.ce-1.el7.centos docker-ce-stabledocker-ce.x86_64 17.03.2.ce-1.el7.centos docker-ce-stabledocker-ce.x86_64 17.03.1.ce-1.el7.centos docker-ce-stabledocker-ce.x86_64 17.03.0.ce-1.el7.centos docker-ce-stable * bas
9、e安装dockerrootlocalhost bigtree# yum install docker-ce docker versionrootlocalhost bigtree# docker version如果有以下红字提示,执行3.7Client: API version: 1.38 Git commit: e68fc7a Built: Tue Aug 21 17:23:03 2018 OS/Arch: linux/amd64 Experimental: falseCannot connect to the Docker daemon at unix:/var/run/docker.so
10、ck. Is the docker daemon running?启动docker,在看一下doucker版本rootlocalhost bigtree# service docker startrootlocalhost bigtree# docker versionClient: API version: 1.38 Git commit: e68fc7a Built: Tue Aug 21 17:23:03 2018 OS/Arch: linux/amd64 Experimental: falseServer: Engine: API version: 1.38 (minimum vers
11、ion 1.12) Git commit: e68fc7a Built: Tue Aug 21 17:25:29 2018 OS/Arch: linux/amd64启动docker以及开机自启动rootlocalhost bigtree# systemctl start dockerrootlocalhost bigtree# systemctl enable docker3.5docker-compose安装rootlocalhost bigtree# pip install docker-compose更新时如果有以下红字提示,必须解决,执行3.5.1,如果没有执行3.6节 3.5.1检查
12、pip安装,记性好的可以不做,我还是看看是不是忘记安装了,进入 pip-10.0.1 目录rootlocalhost bigtree# pip install -upgrade pip3.5.2安装jinja2下载 rootlocalhost bigtreewget解压rootlocalhost bigtree# tar xvf安装rootlocalhost J# python setup.py install安装pyudev下载pyudev rootlocalhost bigtree# git clone 进入 pyudev文件夹 rootloca
13、lhost bigtree# cd pyudev安装 rootbogon pyudev# python setup.py install安装dnspython 下载dnspython rootlocalhost bigtree# wget /kits/1.15.0/dnspython-1.15.0.tar.gz 解压 rootlocalhost bigtree# tar -zxvf dnspython-1.15.0.tar.gz 进入 rootlocalhost bigtree#
14、cd安装rootlocalhost dnspython-1.15.0# python setup.py install再来一次pip installrootlocalhost dnspython-1.15.0# cd .rootlocalhost /# pip install -ignore-installed requests3.6 go语言 安装我用了两种方式安装第一种方式安装的go语言是1.9的版本,后续出了好多版本问题,还得逐一解决。建议采用第二种方式使用更高的版本。第一种方式rootlocalhost bigtree# yum install golang y第二种方式自己下载采取解
15、压安装的方式。 下载安装包自己上网找吧,我安装的是go1.10.3.解压安装rootlocalhost home# tar -C /usr/local -zxf修改环境变量rootlocalhost bigtree# vim /etc/profileexport PATH=$PATH:/usr/local/go/binexport GOROOT=/usr/local/goexport GOPATH=$HOME/goexport PATH=$PATH:$HOME/go/bin然后source一下,立即生效rootlocalhost bigtree# source /etc/profile查看版本
16、rootlocalhost bigtree# go versiongo version go1.10.3 linux/amd64查看环境rootlocalhost bigtree# go env3.7安装node.js(1)下载nodejs rootlocalhost bigtree# wget(2)解压 rootlocalhost bigtree# tar -C /usr/local -xzf(3)安装编译软件 rootlocalhost bigtree# yum install gcc gcc-c+(4)查看编译软件版本 rootlocalhost bigtree# gcc -
17、v这块需要注意,安装完版本还是那样,我这块搞了半天,应该是gcc 版本 8.1.0 (GCC),这块没有截屏,我特意上网找了个相似的图片。(5)版本过低,若已为最新版请跳过至步骤,升级gcc,前往下载你想要的版本(6)下载新版本rootlocalhost bigtree# wget(7)解压 rootlocalhost bigtree# tar -C /usr/local -xzf(8)rootlocalhost bigtree# cd /usr(9)root localhost gcc-8.1.0# ./contrib/download_prerequisites
18、160;(10) rootlocalhost gcc-8.1.0# mkdir build && rootlocalhost gcc-8.1.0# cd build(11)rootlocalhost build# ./configure -enable-checking=release -enable-languages=c,c+ -disable-multilib (12)rootlocalhost build# yum groupinstall "Development Tools"(13)这一步会超慢,如果正赶上下班
19、你就赶快回家吧,我就等了一个多小时,后来还是先回家了。rootlocalhost build# make(14)rootlocalhost build# make install(15)重启系统(16)查看gcc的版本 rootlocalhost bigtree# gcc v使用内建 specs。COLLECT_GCC=gcc目标:x86_64-pc-linux-gnu配置为:./configure -enable-checking=release -enable-languages=c,c+ -disable-multilib线程模型:posixgcc 版本 8.1.0 (GCC)
20、(17)rootlocalhost /# cd /usr进入node安装的目录(18)rootbogon node-v9.9.0# ./configure(19)rootbogon node-v9.9.0# make(20)rootbogon node-v9.9.0# make install3.8安装npm(1)rootlocalhost# npm install npm g(2)root localhost# npm v第四步 到Fabric了4.1下载fabric源码(1)rootlocalhost /# mkdir -p $GOPATH/src/(2)root localh
21、ost /# cd $GOPATH/src/(3)root localhost hyperledger# git clone 4.2切换到版本这个必须得切,我试过其他版本,会有些麻烦,而且由于Fabric一直在更新,所有我们并不需要最新最新的源码,需要切换到版本的源码即可root localhost hyperledger# cd fabricroot localhost fabric# git4.3下载docker镜像注意文件路径,需要跟着上一步 从fabric目录开始root localhost fabric /examples/e2e_cli/root localhost fabric如
22、果镜像不全可以自己比较一下,用以下命令自己下载docker pull hyperledgerdocker pull hyperledgerdocker pull hyperledgerdocker pull hyperledgerdocker pull hyperledgerdocker pull hyperledgerdocker pull hyperledgerdocker pull hyperledgerdocker pull hyperledgerdocker pull hyperledgerdocker pull hyperledgerdocker pull hyperledger/
23、fabric-membersrvc:latest查看docker镜像的命令,有些镜像是可以不用下载的,我pull了这些镜像最后启动Fabric网络并完成ChainCode的测试(1)开启fabric客户端rootlocalhost e2e_cli# ./network_setup.sh up如果出现以下问题Creating network "e2e_cli_default" with the default driverERROR: Failed to Setup IP tables: Unable to enable SKIP DNAT rule: (iptables failed: iptables
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 一窗通办练习试题
- 租赁房屋安全合同
- 玻璃雨棚施工合同
- DB4112∕T 321-2024 蓝莓露地高效栽培技术规程
- 《2024年 柔然历史若干问题研究》范文
- 一年级数学计算题专项练习汇编
- 2024年广东道路客运输从业资格证培训考试资料
- 2024年哈尔滨客运驾驶从业资格证模拟考试题
- 心理健康教育在班级中的应用计划
- 制定前台日常工作清单计划
- 安徽信息工程学院2023届毕业生就业质量年度报告
- 中国融通集团社招笔试题
- 牛奶配送方案
- 电梯安装安全教育培训记录
- 统编版语文八年级上册第六单元 23 孟子三章《富贵不能淫》公开课一等奖创新教学设计
- XX财务诊断报告
- 病案室应急预案及处置流程
- 工程质量检测监理实施细则
- 基因工程技术在农业中的应用
- 2022管理学试题库(马工程)
- 烫伤培训演示课件
评论
0/150
提交评论