Ubuntu 18.04 ETH同步節點搭建
節點搭建的同時,小編邊記錄了搭建了的整個程序,當然僅僅記錄了一種形式的搭建方式,
安裝依賴
apt install git wget vim gcc g++ ntp
安裝go語言
apt install software-properties-common
add-apt-repository ppa:longsleep/golang-backports
apt-get update
apt-get install golang-go
檢查go版本
go version
下載ETH節點搭建代碼
官方鏈接:https://github.com/ethereum/go-ethereum
mkdir -p /data/ethereum
cd /data/ethereum
git clone https://github.com/ethereum/go-ethereum.git
cd go-ethereum
國內需要切換Go包代理
go env -w GOPROXY=https://goproxy.cn
make all
添加環境變數
echo "export PATH=$PATH:/data/ethereum/go-ethereum/build/bin" >> /etc/profile
source /etc/profile
查看版本是否正確
geth version
啟動節點同步
nohup geth --syncmode "fast" --networkid 1 --datadir /data --cache 2048 --identity "節點名稱" --rpc --rpcapi "db,eth,net,web3" --rpccorsdomain "*" --rpcport 8545 --port 30303 --rpcaddr 127.0.0.1 & > nohup.out
查看執行日志
tail -f nohup.out
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/223734.html
標籤:其他
上一篇:ipfs是什么礦機靠譜嗎?ipfs/fil國家認可嗎?
下一篇:Docker安裝與使用
