fabric1.4.3-raft-couchdb部署安装

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接: https://blog.csdn.net/weixin_39304564/article/details/102612059

1、虚拟机安装

vmare下载安装教程:https://www.nocmd.com/740.html

2、系统安装

系统镜像下载地址:http://ftp.sjtu.edu.cn/centos/7.7.1908/isos/x86_64/CentOS-7-x86_64-Everything-1908.iso

3、docker安装

yum install docker 
systemctl enable docker

4、docker compose安装

curl -L https://github.com/docker/compose/releases/download/1.23.2/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose

5、关闭防火墙

systemctl stop firewalld.service   #停止firewall
systemctl disable firewalld.service   #禁止firewall开机启动
firewall-cmd --state   #查看默认防火墙状态(关闭后显示notrunning,开启后显示running)
service docker restart  #注意关闭防火墙之后需要重启docker

6、关闭SELinux防火墙

#临时关闭
setenforce=0  

7、golang安装

下载golang安装包并解压缩

wget https://studygolang.com/dl/golang/go1.13.1.linux-amd64.tar.gz
tar zxvf go1.13.1.linux-amd64.tar.gz
mv go /usr/local/go
mkdir -p /opt/gopath/src/github.com

#修改环境变量

vim /etc/profile

新增内容为:

GOROOT=/usr/local/go
GOPATH=/opt/gopath
PATH=$PATH:$GOPATH/bin:$GOROOT/bin

设置环境变量生效

source /etc/profile

检查go是否安装成功

go version

8、fabric-samples安装

git clone https://github.com/hyperledger/fabric-samples.git
cd ./fabric-samples

9、fabric-samples安装

curl -sS https://raw.githubusercontent.com/hyperledger/fabric/master/scripts/bootstrap.sh -o ./scripts/bootstrap.sh
chmod +x ./scripts/bootstrap.sh
./scripts/bootstrap.sh [version] [ca version] [thirdparty_version]
#注意如果有image安装失败,则可以手动安装

启动fabric sample

cd ./first-network
./byfn.sh up
#启动couchdb和raft命令为
#./byfn.sh up -o etcdraft -s couchdb

关闭fabric sample

./byfn.sh down

猜你喜欢

转载自blog.csdn.net/weixin_39304564/article/details/102612059