Home | 简体中文 | 繁体中文 | 杂文 | 知乎专栏 | 51CTO学院 | CSDN程序员研修院 | Github | OSChina 博客 | 腾讯云社区 | 阿里云栖社区 | Facebook | Linkedin | Youtube | 打赏(Donations) | About
知乎专栏多维度架构

3.5. 使用 pm2 启动以太坊

		
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