fabric1.4基本环境安装简书

安装git
yum -y install gcc-c++ git

安装go语言

cd /opt
mkdir golang
cd golang
yum install wget -y
wget https://dl.google.com/go/go1.12.9.linux-amd64.tar.gz
tar -zxvf go1.12.9.linux-amd64.tar.gz

vim /etc/profile
export GOPATH=/opt/gopath
export GOROOT=/opt/golang/go
export PATH=$GOROOT/bin:$PATH

source /etc/profile

安装docker
yum install -y yum-utils
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum makecache fast
yum install docker-ce -y
systemctl start docker
systemctl enable docker
docker --version

安装docker-compose,负责实现对Docker容器集群的快速编排
yum -y install epel-release
yum -y install python-pip
pip --version
pip install --upgrade pip
pip install docker-compose
yum install bash-completion -y
docker-compose version

安装Node.js Runtime and NPM
fabric目前不支持低于8.x系列的其他版本
wget https://npm.taobao.org/mirrors/node/v8.9.4/node-v8.9.4-linux-x64.tar.xz
tar xf node-v8.9.4-linux-x64.tar.xz
mv node-v8.9.4-linux-x64/ /usr/local/nodejs
chown -R root.root /usr/local/nodejs/
ln -s  /usr/local/nodejs/bin/node /usr/bin/node
echo "export PATH=$PATH:/usr/local/nodejs/bin" >>/etc/profile
source /etc/profile
node -v
npm -v
npm太慢,用淘宝镜像代替npm官方镜像
npm config set registry https://registry.npm.taobao.org
配置后可通过下面方式来验证是否成功
npm config get registry
安装express module测试
npm install express -g # -g是全局安装的意思

你可能感兴趣的:(区块链)