以太坊swarm初学

以太坊swarm初学

安装过程

  • 安装环境基于ubuntu 18.04 LTS amd_64

  • 安装bee clief
    这种安装方式是安装一个在Bee Node里集成了集成了Go-Ethereum Clef signer实例的节点。我们可以选择只装Bee或者Bee Clief, 初学者适合安装Bee clief。
    Bee Node是一个基于以太坊2.0 SWARM存储协议的节点,文章在这里https://docs.ethswarm.org/docs/

      安装:wget https://github.com/ethersphere/bee-clef/releases/download/v0.4.9/bee-clef_0.4.9_amd64.deb
            sudo dpkg -i bee-clef_0.4.9_amd64.deb
    
  • 检查状态
    systemctl status bee-clef
    lyp@lyp-ThinkPad-E550:~/ethereum$ systemctl status bee-clef
    ● bee-clef.service - Bee Clef
    Loaded: loaded (/lib/systemd/system/bee-clef.service; enabled; vendor preset: enabled)
    Active: active (running) since Fri 2021-04-16 14:28:58 CST; 24min ago
    Docs: https://docs.ethswarm.org
    Main PID: 21063 (bash)
    Tasks: 12 (limit: 4915)
    CGroup: /system.slice/bee-clef.service
    ├─21063 bash /usr/bin/bee-clef-service start
    ├─21089 clef --stdio-ui --keystore /var/lib/bee-clef/keystore --configdir /var/lib/bee-clef --chainid 5 --rules /etc/bee-clef/rules.js --nousb --lightkdf --4bytedb-custom /etc/bee-clef/4byte.js
    └─21091 tee /var/lib/bee-clef/stdout

  • 安装BEE

     	wget https://github.com/ethersphere/bee/releases/download/v0.5.3/bee_0.5.3_amd64.deb
     	sudo dpkg -i bee_0.5.3_amd64.deb
    
  • 备份数据

      	systemctl stop bee
      	sudo chown -R bee:bee /var/lib/bee/statestore
     		    
     	#cd /var/lib/bee
     	#cp -rf bee-clef  bee-clef_lyp_bak_from_var_lib_bee
     	#cp -rf bee   bee_lyp_bak_from_var_lib_bee
     	cp -rf /var/lib/bee ~/
    
  • 启动bee

     	systemctl start bee
    
  • 查看CLEF日志

       	 journalctl -f -u bee-clef.service		
    

-查看BEE日志

		root@lyp-ThinkPad-E550:~/ethererum# journalctl -f -u bee-clef.service
		-- Logs begin at Mon 2021-02-22 16:01:34 CST. --
		4月 16 16:13:21 lyp-ThinkPad-E550 bee-clef-service[7856]: INFO [04-16|16:13:21.160] Op approved
		4月 16 16:13:27 lyp-ThinkPad-E550 bee-clef-service[7856]: INFO [04-16|16:13:27.987] Op approved
		4月 16 16:13:41 lyp-ThinkPad-E550 bee-clef-service[7856]: INFO [04-16|16:13:41.558] Op approved
		4月 16 16:13:44 lyp-ThinkPad-E550 bee-clef-service[7856]: INFO [04-16|16:13:44.931] Op approved
		4月 16 16:14:03 lyp-ThinkPad-E550 bee-clef-service[7856]: INFO [04-16|16:14:03.083] Op approved
		4月 16 16:14:12 lyp-ThinkPad-E550 bee-clef-service[7856]: INFO [04-16|16:14:12.414] Op approved
		4月 16 16:14:39 lyp-ThinkPad-E550 bee-clef-service[7856]: INFO [04-16|16:14:39.376] Op approved
		4月 16 16:14:56 lyp-ThinkPad-E550 bee-clef-service[7856]: INFO [04-16|16:14:56.921] Op approved
		4月 16 16:15:03 lyp-ThinkPad-E550 bee-clef-service[7856]: INFO [04-16|16:15:03.935] Op approved
		4月 16 16:15:06 lyp-ThinkPad-E550 bee-clef-service[7856]: INFO [04-16|16:15:06.023] Op approved
		
		4月 16 16:15:07 lyp-ThinkPad-E550 bee-clef-service[7856]: INFO [04-16|16:15:07.694] Op approved

-重装的话如何恢复钱包数据

		cp -rf ~/bee/* /var/lib/bee/
		然后再启动bee-clef    
		最后再启动 bee
上一篇:Photoshop将美女图片修出纤细的苗条身材


下一篇:【Linux学习】基本操作