知乎專欄 | 多維度架構 | | | 微信號 netkiller-ebook | | | QQ群:128659835 請註明“讀者” |
npm install -g pm2
創建 ~/geth.json 檔案
[ { "name" : "geth", "cwd" : "/usr/bin/", "script" : "geth", "args" : "--rpcapi eth,web3 --rpc --dev --datadir /home/neo/ethereum", "log_date_format" : "YYYY-MM-DD HH:mm Z", "out_file" : "/home/neo/ethereum/log/geth_out.log", "error_file" : "/home/neo/ethereum/log/geth_err.log", "log_file" : "/home/neo/ethereum/log/geth_log.log", "merge_logs" : false, "watch" : false, "max_restarts" : 10, "exec_interpreter" : "none", "exec_mode" : "fork_mode" } ]
啟動以太坊
pm2 start geth.json