root@cc-virtual-machine:/opt# git clone https://github.com/etherparty/explorer
root@cc-virtual-machine:/opt# cd explorer
root@cc-virtual-machine:/opt/explorer# vim app/app.js
将var eth_node_url = 'http://localhost:8545'; 修改为 var eth_node_url = 'http://192.168.172.201:8545';
root@cc-virtual-machine:/opt# cd explorer
root@cc-virtual-machine:/opt/explorer# vim ./package.json
将"start": "http-server ./app -a localhost -p 8000 -c-1", 修改为"start": "http-server ./app -a 192.168.172.201 -p 8000 -c-1",
root@cc-virtual-machine:/opt/explorer# npm install -g bower -y
root@cc-virtual-machine:/opt/explorer# bower init
root@cc-virtual-machine:/opt/explorer# bower install --allow-root
root@cc-virtual-machine:/opt/explorer# bower install angular --save-dev --allow-root
root@cc-virtual-machine:/opt# geth --datadir ./data/00/ --networkid 18 --port 28000 --rpc --rpcaddr "0.0.0.0" --rpcport 8545 --rpcapi 'db,net,eth,web3' --rpccorsdomain '*' --nodiscover console
INFO [05-26|16:44:32] Maximum peer count ETH=25 LES=0 total=25
INFO [05-26|16:44:32] Starting peer-to-peer node instance=Geth/v1.8.8-unstable-784aa839/linux-amd64/go1.10.2
INFO [05-26|16:44:32] Allocated cache and file handles database=/opt/data/00/geth/chaindata cache=768 handles=512
INFO [05-26|16:44:32] Initialised chain configuration config="{ChainID: 18 Homestead: 0 DAO: <nil> DAOSupport: false EIP150: <nil> EIP155: 0 EIP158: 0 Byzantium: <nil> Constantinople: <nil> Engine: unknown}"
root@cc-virtual-machine:/opt/explorer# npm start
> EthereumExplorer@0.1.0 prestart /opt/explorer
> npm install
npm WARN lifecycle EthereumExplorer@0.1.0~postinstall: cannot run in wd %s %s (wd=%s) EthereumExplorer@0.1.0 bower install /opt/explorer
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.3 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
up to date in 5.969s
> EthereumExplorer@0.1.0 start /opt/explorer
> http-server ./app -a 192.168.172.201 -p 8000 -c-1
Starting up http-server, serving ./app on port: 8000
Hit CTRL-C to stop the server




版权声明:B链网原创,严禁修改。转载请注明作者和原文链接
作者:雨后的蚊子
文章来源: 以太坊区块链浏览器的搭建