一起学习、讨论的伙伴 +q 260261476,交流、指导!
(https://blog.csdn.net/TBBetter/article/details/120749172)等项目设计
install go
wget -c https://studygolang.com/dl/golang/go1.16.3.linux-amd64.tar.gz
sudo tar -xz -f ./go1.16.3.linux-amd64.tar.gz -C /usr/local
sudo gedit ~/.bashrc
# 把下面这 4 行加入到文件末尾
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export GOBIN=$GOPATH/bin
export PATH=$GOPATH:$GOBIN:$GOROOT/bin:$PATH
source ~/.bashrc
go env -w GO111MODULE=on
go env -w GOPROXY=https://goproxy.cn,direct
install docker
sudo apt-get update
sudo apt-get install \
apt-transport-https \
ca-certificates \
software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux /ubuntu \
$(lsb_release -cs) \
stable"
sudo apt-get update
sudo apt-get install docker-ce
sudo groupadd docker
sudo gpasswd -a $USER docker
newgrp docker
docker ps
sudo systemctl daemon-reload
sudo systemctl restart docker
4.测试 docker 是否安装成功, 返回 Hello from Docker!则成功!
docker run hello-world
5. images
https://cr.console.aliyun.com/cn-hangzhou/instances
install docker-compose
sudo apt install docker-compose
Download source code
mkdir -p ~/go/src/github.com/hyperledger && cd ~/go/src/github.com/hyperledger
git clone https://github.com/hyperledger/fabric.git
git clone https://github.com/hyperledger/fabric-samples.git
Download Images
https://cr.console.aliyun.com/?spm=5176.10695662.1362911.3.789c262cY82210
cd ~/go/src/github.com/hyperledger/fabric/scripts
sudo ./bootstrap.sh
Download Mysql 5.27 ( ubuntu 18.04)
sudo apt-get update
sudo apt-get install mysql-server
sudo mysql_secure_installation
(NNYNY)
sudo mysql -uroot -p
GRANT ALL PRIVILEGES ON *.* TO root@localhost IDENTIFIED BY "123456";
sudo geidt /etc/mysql/mysql.conf.d/mysqld.cnf
skip-grant-tables
service mysql restart
mysql -u root -p
update user set authentication_string=password("123456"),plugin='mysql_native_password' where user='root';
service mysql restart
#!/bin/bash
#
# Copyright IBM Corp. All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
export VERSION=1.4.4
export CA_VERSION=1.4.4
export THIRDPARTY_IMAGE_VERSION=0.4.18
export ARCH=$(echo "$(uname -s|tr '[:upper:]' '[:lower:]'|sed 's/mingw64_nt.*/windows/')-$(uname -m | sed 's/x86_64/amd64/g')")
export MARCH=$(uname -m)
printHelp() {
echo "Usage: bootstrap.sh [version [ca_version [thirdparty_version]]] [options]"
echo
echo "options:"
echo "-h : this help"
echo "-d : bypass docker image download"
echo "-s : bypass fabric-samples repo clone"
echo "-b : bypass download of platform-specific binaries"
echo
echo "e.g. bootstrap.sh 1.4.4 -s"
echo "would download docker images and binaries for version 1.4.4"
}
dockerFabricPull() {
local FABRIC_TAG=$1
for IMAGES in peer orderer ccenv tools; do
echo "==> FABRIC IMAGE: $IMAGES"
echo
docker pull hyperledger/fabric-$IMAGES:$FABRIC_TAG
docker tag hyperledger/fabric-