以太坊 Geth 的安装和使用,开启RPC接口
钱包的安装 windows2008安装geth
https://geth.ethereum.org/downloads/ 下载window的.exe安装包,运行安装即可。
Ubuntu 安装geth
sudo add-apt-repository -y ppa:ethereum/ethereum sudo apt-get update sudo apt-get install ethereum 启动钱包同步并开启geth rpc接口 windows2008
geth -fast -datadir "C:\Ethereum" –maxpeers 100 console 2>>geth.log –rpc –rpcapi "eth,personal" –rpcport 8545 –rpccorsdomain '"*"' Ubuntu下
geth –fast –datadir "/root/Gopath/eth_geth" –maxpeers 100 console 2>>"/root/Gopath/eth_geth/geth.log" –rpc –rpcapi "eth,personal,web3" RPC接口说明
–rpc –rpcapi "eth,personal,web3" 表示开启RPC接口,引号里面的表示开启的模块 连接到已经在运行的geth节点
geth attach http://localhost:8545 geth钱包同步状态 启动geth的时候加了console命令,表示进入命令行模式,geth的运行日志保存在geth.log文件内
查看geth同步状态,通过syncing命令
> eth.syncing false 返回false表示初次同步已完成,可以使用。
> eth.