ubuntu18.0.3安装教程
sudo apt update
sudo apt-get update
sudo apt-get install \ apt-transport-https \ ca-certificates \ curl \ gnupg-agent \ software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
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 docker-ce-cli containerd.io
sudo apt-get update
之后重复运行上一步(这一步可以不全完成)
sudo apt-get install docker-ce=<5:18.09.9~3-0~ubuntu-bionic> docker-ce-cli=<5:18.09.9~3-0~ubuntu-bionic> containerd.io
sudo apt-get install docker-ce -y
docker version
sudo gpasswd -a ${USER} docker
systemctl restart docker
newgrp - docker
docker version
sudo apt-get install python-pip -y
sudo pip install docker-compose
这一步成功了最好,不行了下一步
python --version
如果python版本是2.7,进行如下操作,否则跳过
sudo apt-get install -y python3
cd /usr/bin/
sudo rm python
sudo ln -s /usr/bin/python3.6 /usr/bin/python
python -V
cd ~
sudo apt-get install -y python3-pip
多刷新几次
pip -V
结果如下:
pip 9.0.1 from /usr/lib/python3/dist-packages (python 3.6)
sudo pip install docker-compose
(可能会超时,解决办法如下)
选择镜像:(由于代码中包含`字符,以如下形式展示)
sudo curl -L https://get.daocloud.io/docker/compose/releases/download/1.25.1/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
docker-compose --version
docker-compose -h
https://golang.org/dl/
https://studygolang.com/dl
wget https://dl.google.com/go/go1.11.linux-amd64.tar.gz
安装yum: sudo apt install yum
安装libssl-dev:sudo apt-get install libssl-dev
安装openssl:sudo apt-get install openssl
更新wget:sudo yum update wget
sudo tar zxvf go1.15.6.linux-amd64.tar.gz -C /usr/local
mkdir $HOME/go
vim ~/.bashrc
vim ~/.bash_profile
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
source ~/.bashrc
source ~/.bash_profile
go version
官方地址:https://nodejs.org/en/download/
wget https://nodejs.org/dist/v14.15.1/node-v14.15.1-linux-x64.tar.xz
sudo tar xvf node-v14.15.1-linux-x64.tar.xz -C /opt
sudo vim /etc/profile
export NODEJS_HOME=/opt/node-v14.15.1-linux-x64
export PATH=$PATH:$NODEJS_HOME/bin
. /etc/profile
node -v
cd ~
mkdir hyperledger-fabric
cd hyperledger-fabric
curl -sSL
https://raw.githubusercontent.com/hyperledger/fabric/master/scripts/bootstrap.sh | bash -s 2.3.0 1.4.9 0.4.18
curl -sSL http://bit.ly/2ysb0FE | bash -s 2.3.0 1.4.9 0.4.18
curl -sSL
https://raw.githubusercontent.com/hyperledger/fabric/master/scripts/bootstrap.sh -o bootstrap.sh
https://github.com/hyperledger/fabric/releases/download/v2.3.0/hyperledger-fabric-linux-amd64-2.3.0.tar.gz
https://github.com/hyperledger/fabric-ca/releases/download/v1.4.9/hyperledger-fabric-ca-linux-amd64-1.4.9.tar.gz
tar -zxvf hyperledger-fabric-linux-amd64-2.3.0.tar.gz
tar -zxvf hyperledger-fabric-ca-linux-amd64-1.4.9.tar.gz
sudo sh bootstrap.sh
git clone https://github.com/hyperledger/fabric-samples.git
https://github.com/hyperledger/fabric/releases/download/v2.3.0/hyperledger-fabric-linux-amd64-2.3.0.tar.gz
https://github.com/hyperledger/fabric-ca/releases/download/v1.4.9/hyperledger-fabric-ca-linux-amd64-1.4.9.tar.gz
tar -zxvf hyperledger-fabric-linux-amd64-2.3.0.tar.gz
tar -zxvf hyperledger-fabric-ca-linux-amd64-1.4.9.tar.gz
sudo sh bootstrap.sh
sudo gpasswd -a ${USER} docker
systemctl restart docker
newgrp - docker
docker version
./network.sh up
至此,hyperledger-fabric2.3.0 已完全实现,作者从不同地方试用各类教程总结出的一套适用于2020年最新版2.3.0的fabric环境搭建,希望有所帮助!************************************************