>geth --networkid 123 --dev --datadir "d:/blockchain/project/ethereum" --rpc --rpcaddr 172.16.12.11 --rpcport 8989 --port 3000
1.在geth安装目录下,配置genesis.json文件:
{
"config": {
"chainId": ,
"homesteadBlock": ,
"eip155Block": ,
"eip158Block":
},
"difficulty": "",
"gasLimit": "",
"alloc": {
"7df9a875a174b3bc565e6424a0050ebc1b2d1d82": { "balance": "" },
"f41c74c9ae680c1aa78f42e5647a62f353b7bdde": { "balance": "" }
}
}
2.初始化
geth --datadir "d:/blockchain/geth/chain" genesis.json
3.进入控制台
geth --datadir "d:/blockchain/geth/chain" console
3.常用命令
1.personal.listAccounts
personal.listAccounts[0]
2.personal.newAccount("pwd")
3.web3.eth.coinbase :当前使用的账户
4.eth.getBalance(personal.listAccounts[0])
end