以太坊区块链浏览器的搭建

匿名 (未验证) 提交于 2019-12-03 00:22:01
  1. root@cc-virtual-machine:/opt# git clone https://github.com/etherparty/explorer
  1. root@cc-virtual-machine:/opt# cd explorer
  2. root@cc-virtual-machine:/opt/explorer# vim app/app.js
  3. var eth_node_url = 'http://localhost:8545'; 修改为 var eth_node_url = 'http://192.168.172.201:8545';
  1. root@cc-virtual-machine:/opt# cd explorer
  2. root@cc-virtual-machine:/opt/explorer# vim ./package.json
  3. "start": "http-server ./app -a localhost -p 8000 -c-1", 修改为"start": "http-server ./app -a 192.168.172.201 -p 8000 -c-1",
  1. root@cc-virtual-machine:/opt/explorer# npm install -g bower -y
  2. root@cc-virtual-machine:/opt/explorer# bower init
  3. root@cc-virtual-machine:/opt/explorer# bower install --allow-root
  4. root@cc-virtual-machine:/opt/explorer# bower install angular --save-dev --allow-root
  1. 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
  2. INFO [05-26|16:44:32] Maximum peer count ETH=25 LES=0 total=25
  3. INFO [05-26|16:44:32] Starting peer-to-peer node instance=Geth/v1.8.8-unstable-784aa839/linux-amd64/go1.10.2
  4. INFO [05-26|16:44:32] Allocated cache and file handles database=/opt/data/00/geth/chaindata cache=768 handles=512
  5. 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}"
  1. root@cc-virtual-machine:/opt/explorer# npm start
  2. > EthereumExplorer@0.1.0 prestart /opt/explorer
  3. > npm install
  4. npm WARN lifecycle EthereumExplorer@0.1.0~postinstall: cannot run in wd %s %s (wd=%s) EthereumExplorer@0.1.0 bower install /opt/explorer
  5. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.3 (node_modules/fsevents):
  6. npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
  7. up to date in 5.969s
  8. > EthereumExplorer@0.1.0 start /opt/explorer
  9. > http-server ./app -a 192.168.172.201 -p 8000 -c-1
  10. Starting up http-server, serving ./app on port: 8000
  11. Hit CTRL-C to stop the server

版权声明:B链网原创,严禁修改。转载请注明作者和原文链接

作者:雨后的蚊子

http://www.360bchain.com/article/156.html

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!