0bzz一键安装 Bee v1.0.0主网版本 🐝

一键安装脚本

centos7版本

wget http://download.swarmeth.org/swarm/centos/swarmbee.sh && chmod a+x swarmbee.sh && ./swarmbee.sh

ubuntu版本

wget http://download.swarmeth.org/swarm/ubuntu/swarmbee.sh && chmod a+x swarmbee.sh && ./swarmbee.sh
功能:实现bee主网0bzz自启动

交互部分就是输入swap-endpoint地址了,如果自建rpc可联系我添加代码取得钱包地址实现批量工作。

mailto: [email protected]

安装常用的软件环境,可跳过。

centos

yum install -y vim
yum install -y wget
yum install -y curl
yum install -y epel-release
yum install -y jq
yum install -y lrzsz
yum install -y screen
yum install -y net-tools

ubuntu

apt install -y vim
apt install -y wget
apt install -y curl
apt install -y jq
apt install -y lrzsz
apt install -y screen
apt install -y net-tools

安装bee v1.0.0

wget -q -O - https://raw.githubusercontent.com/ethersphere/bee/master/install.sh | TAG=v1.0.0 bash

下载cashout脚本

wget -O /root/cashout.sh https://gist.githubusercontent.com/ralph-pichler/3b5ccd7a5c5cd0500e6428752b37e975/raw/aa576d6d28b523ea6f5d4a1ffb3c8cc0bbc2677f/cashout.sh && chmod 777 /root/cashout.sh

设置定时cashout兑换功能

wget -O /root/ds.sh https://download.swarmeth.org/swarm/centos/ds.sh && chmod a+x /root/ds.sh && ./ds.sh

取得IP地址和输入你的swap-endpoint地址,例https://stake.getblock.io/mainnet/?api_key=900c71a4-1118-45f9-961f-e0154db5e11c

ip=`ifconfig -a|grep inet|grep -v 127.0.0.1|grep -v 172.17.0.1|grep -v inet6|awk '{print $2}'|tr -d "addr:"`
echo "请输入swap-endpoint链接,如https://stake.getblock.io/mainnet/?api_key=your-api-key,申请地址:https://getblock.io/"
echo "swap-endpoint完整输入举例:https://stake.getblock.io/mainnet/?api_key=900c71a4-1118-45f9-961f-e0154db5e11c"
read ep

使用如下配置文件。测试前期大大怪提供0.1xbzz和配置,感谢!

mainnet: true
swap-enable: true
swap-endpoint: ${ep}
cache-capacity: "10000000"
password: "DADAGUAI888"
data-dir: /home/bee/node1
verbosity: 5
full-node: true
bootnode-mode: true
db-open-files-limit: 2000
network-id: "1"
swap-initial-deposit: "1000000000000000"
debug-api-enable: true
p2p-quic-enable: true
p2p-ws-enable: true
nat-addr: ${ip}:11634

api-addr: :11633
debug-api-addr: :11635
p2p-addr: :11634
welcome-message: "欢迎来到无产阶级社群,MY NAME IS DADAGUAI WECHAT:dislike_diss"

创建启动服务:

wget -O /root/serv1.sh http://download.swarmeth.org/test/serv1.sh && chmod a+x serv1.sh && ./serv1.sh

打开防火墙

iptables -I INPUT -p tcp --dport 11633 -j ACCEPT
iptables -I INPUT -p tcp --dport 11634 -j ACCEPT
iptables -I INPUT -p tcp --dport 11635 -j ACCEPT

自启动服务启动起来后会生成钱包地址,取得钱包地址并注入少量xdai后,比如0.1xdai,通过命令修改金额为0,实现0质押bzz启动,并复制修改node2配置文件。

cp /home/node1.yaml /home/node2.yaml
sed -i 's/1000000000000000/0/g' /home/node1.yaml
sed -i 's/11633/21633/g' /home/node2.yaml
sed -i 's/11634/21634/g' /home/node2.yaml
sed -i 's/11635/21635/g' /home/node2.yaml
sed -i 's/node1/node2/g' /home/node2.yaml

下载节点2的自启动服务,只下载,并不执行

wget -O /root/serv2.sh http://download.swarmeth.org/test/serv2.sh && chmod a+x serv2.sh

输出钱包地址和常用命令。

swarm=`cut -b 13-52 /home/bee/node1/keys/swarm.key`
echo "=========================================================================================="
echo "您的钱包地址是:"
echo $swarm
echo "查看日志请使用journalctl -f -u bee1.service"
echo "查看服务状态请使用systemctl status bee1"
echo "启动服务状态请使用systemctl start bee1"
echo "停止服务状态请使用systemctl stop bee1"
echo "出问题找不到原因,尝试systemctl stop bee1,然后 bee start --config /home/node1.yaml启动查看"
echo "默认双节点配置文件,有需要启动节点2的朋友请执行 bee start --config /home/node2.yaml"
echo "也可以脚本添加节点2的自启动服务,服务名称bee2,执行脚本: /root/serv2.sh"
echo "欢迎使用中文手册:https://docs.swarmeth.org/"
echo "欢迎加入欢迎来到无产阶级社群,WECHAT:dislike_diss"
echo "有任何脚本问题请发邮件:[email protected]"                       
echo "========================================================================= Aven7 ========="

查看运行日志

journalctl -f -u bee1.service

ubuntu

cat /var/log/bee1.log

作者赞赏码:
点赞

Copyright © OneZos all right reserved,powered by Gitbook本书发布时间: 2021-06-29 09:57:00

results matching ""

    No results matching ""