以太坊公链私链geth同步

1、安装必备环境插件 #1-5 公有链 +6-10 私有链

yum update -y && yum install git wget bzip2 vim gcc-c++ ntp epel-release nodejs cmake -y
yum install -y curl git golang nodejs gcc-c++

2、安装go语言

wget https://dl.google.com/go/go1.10.linux-amd64.tar.gz
tar -C /usr/local -xzf go1.10.linux-amd64.tar.gz
echo 'export GOROOT=/usr/local/go' >> /etc/bashrc 
echo 'export PATH=$PATH:$GOROOT/bin' >> /etc/bashrc  
echo 'export GOPATH=/root/go' >> /etc/bashrc
echo 'export PATH=$PATH:$GOPATH/bin' >> /etc/bashrc
source /etc/bashrc

3、验证go语言安装成功

[root@jubeiTest root]# go version
go version go1.10 linux/amd64

4、安装geth客户端 '我的路径'=/mnt/

git clone https://github.com/ethereum/go-ethereum.git  
cd go-ethereum  
make all
echo 'export PATH=$PATH:/’你的路径’/go-ethereum/build/bin' >> /etc/bashrc
source /etc/bashrc

5、验证geth

6、智能合约

同步节点

7、创建创世文件(genesis.json)

8、初始化创世文件

9、创建start.sh脚本

10、进入控制台

history命令

Last updated