以太坊

centos7 以太坊環境搭建
1、yum update -y && yum install git wget bzip2 vim gcc-c++ ntp epel-release nodejs cmake -y
2、yum install epel
3、yum install golang
4、cd /usr/local/
git clone https://github.com/ethereum/go-ethereum.git
cd go-ethereum
make all
5、echo "export PATH=$PATH:/usr/local/go-ethereum/build/bin" >> /etc/profile
6、source /etc/profile
7、cmake 安裝
cd /tmp/&& wget https://cmake.org/files/v3.9/cmake-3.9.2.tar.gz
tar xzvf cmake-3.9.2.tar.gz
cd cmaker-3.9.2
./bootstrap && make && make install
8、mkdir /data/{ethbase,genesis}
9、touch /data/genesis/gensis.json
{
"nonce": "0x0000000000000042",
"timestamp": "0x00",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"extraData": "0x00",
"gasLimit": "0x80000000",
"difficulty": "0x400",
"mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"coinbase": "0x2D356ee3F5b8718d8690AFCD31Fe2CB5E602677e",
"alloc": {},
"config": {
"chainId": 1248,
"homesteadBlock": 0,
"eip155Block": 0,
"eip158Block": 0
}
}

10、geth --datadir "/data/ethbase/chain/" init /data/gensis/genesis.json

geth --identity TestNode --rpc --rpcport 12480 --datadir /data/ethbase/chain/geth/chaindata --port 30303 --nodiscover console

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章