为什么80%的码农都做不了架构师?>>>
一、apt-get update
二、安装docker
sudo apt-get install docker.io
如果安装报错:E: Unable to locate package,请执行第一条。
# docker -v
Docker version 1.6.2, build 7c8fca2
# docker version
Client version: 1.6.2
Client API version: 1.18
Go version (client): go1.2.1
Git commit (client): 7c8fca2
OS/Arch (client): linux/amd64
Server version: 1.6.2
Server API version: 1.18
Go version (server): go1.2.1
Git commit (server): 7c8fca2
OS/Arch (server): linux/amd64
# docker pull hello-world
# docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
hello-world latest 19b3f968b60c 10 weeks ago 1.84 kB
# docker run hello-world
Hello from Docker!
# service docker status
docker start/running, process 5864
# service docker start
# service docker stop
三、安装go
# mkdir -p /usr/local/go
# go version
go version go1.10.1 linux/amd64
四、查询python版本
# python -V
Python 2.7.6
五、安装fabric
# cd /usr/local/fabric/
# git clone https://github.com/hyperledger/fabric.git
# cd /usr/local/fabric/fabric/examples/e2e_cli
# source download-dockerimages.sh -c x86_64-1.0.0 -f x86_64-1.0.0
# docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
hello-world latest 19b3f968b60c 10 weeks ago 1.84 kB
hyperledger/fabric-tools latest 7367f4ee085f 16 months ago 1.32 GB
hyperledger/fabric-tools x86_64-1.0.0 7367f4ee085f 16 months ago 1.32 GB
hyperledger/fabric-couchdb latest 1daed7a099ae 16 months ago 1.481 GB
hyperledger/fabric-couchdb x86_64-1.0.0 1daed7a099ae 16 months ago 1.481 GB
hyperledger/fabric-kafka latest 4b267c27a01d 16 months ago 1.297 GB
hyperledger/fabric-kafka x86_64-1.0.0 4b267c27a01d 16 months ago 1.297 GB
hyperledger/fabric-zookeeper latest ceb7b7ab05d0 16 months ago 1.312 GB
hyperledger/fabric-zookeeper x86_64-1.0.0 ceb7b7ab05d0 16 months ago 1.312 GB
hyperledger/fabric-orderer latest 48e2a29019f6 16 months ago 179 MB
hyperledger/fabric-orderer x86_64-1.0.0 48e2a29019f6 16 months ago 179 MB
hyperledger/fabric-peer latest 84ca9b2008d7 16 months ago 181.9 MB
hyperledger/fabric-peer x86_64-1.0.0 84ca9b2008d7 16 months ago 181.9 MB
hyperledger/fabric-javaenv latest e9b8c9d96dff 16 months ago 1.424 GB
hyperledger/fabric-javaenv x86_64-1.0.0 e9b8c9d96dff 16 months ago 1.424 GB
hyperledger/fabric-ccenv latest bf69102dbaaa 16 months ago 1.292 GB
hyperledger/fabric-ccenv x86_64-1.0.0 bf69102dbaaa 16 months ago 1.292 GB
hyperledger/fabric-ca x86_64-1.0.0 b68ac8ace6c5 16 months ago 237.9 MB
hyperledger/fabric-ca latest b68ac8ace6c5 16 months ago 237.9 MB
六、安装docker-compose
$ sudo pip install docker-compose
# chmod +x /usr/local/bin/docker-compose
# docker-compose version
docker-compose version 1.17.1, build 6d101fb
docker-py version: 2.5.1
CPython version: 2.7.13
OpenSSL version: OpenSSL 1.0.1t 3 May 2016
# docker-compose version
docker-compose version 1.9.0, build 2585387
docker-py version: 1.10.6
CPython version: 2.7.9
OpenSSL version: OpenSSL 1.0.1t 3 May 2016
七、pip
# pip --version
pip 1.5.4 from /usr/lib/python2.7/dist-packages (python 2.7)
八、启动fabric
# cd /usr/local/fabric/fabric/examples/e2e_cli
# ./network_setup.sh up
ERROR: client and server don't have same version (client : 1.22, server: 1.18)
出现问题可使用下面两句话