知乎专栏 | 多维度架构 |
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