okx

swarm挖矿Linux多节点部署脚本

时间:2023-06-28|浏览:209

欧易

欧易(OKX)

用戶喜愛的交易所

币安

币安(Binance)

已有账号登陆后会弹出下载

如果电脑未安装docker及docker-compose,安装脚本详情上一篇文章:swarm挖矿程序单节点部署脚本(docker)。执行step1步骤即可。

多节点部署脚本:如果你想在一台电脑上部署多个节点,请使用下面的脚本:

```bash #!/bin/bash

#需要运行的Swarm容器数量,可根据自己电脑配置自行修改此值 let count=10

function createBeeNodeDir { sudo mkdir /usr/local/docker for ((i=0; iecho "批量创建Bee节点目录" createBeeNodeDir echo "创建Bee节点目录成功,路径为/usr/local/docker"

function createDockerComposeDotYml { for ((i=0; iecho "创建docker-compose.yml文件" createDockerComposeDotYml echo "docker-compose.yml创建成功"

function createDockerComposeDotYml { sudo touch /usr/local/docker/bee-node1/.env for ((i=0; i### CLEF ### # chain id to use for signing (1=mainnet, 3=ropsten, 4=rinkeby, 5=goerli) (default: 12345) CLEF_CHAINID=5

### BEE ### # HTTP API listen address (default: :1633) BEE_API_ADDR=:1633 # initial nodes to connect to (default [/dnsaddr/bootnode.ethswarm.org]) BEE_BOOTNODE=[/dnsaddr/bootnode.ethswarm.org] # cause the node to always accept incoming connections BEE_BOOTNODE_MODE=false # enable clef signer BEE_CLEF_SIGNER_ENABLE=true # clef signer endpoint BEE_CLEF_SIGNER_ENDPOINT=http://clef-$i:8550 # config file (default is /home/bee/.bee.yaml) BEE_CONFIG=/home/bee/.bee.yaml # origins with CORS headers enabled BEE_CORS_ALLOWED_ORIGINS=[] # data directory (default /home/bee/.bee) BEE_DATA_DIR=/home/bee/.bee # db capacity in chunks, multiply by 4096 to get approximate capacity in bytes BEE_DB_CAPACITY=5000000 # number of open files allowed by database BEE_DB_OPEN_FILES_LIMIT=200 # size of block cache of the database in bytes BEE_DB_BLOCK_CACHE_CAPACITY=33554432 # size of the database write buffer in bytes BEE_DB_WRITE_BUFFER_SIZE=33554432 # disables db compactions triggered by seeks BEE_DB_DISABLE_SEEKS_COMPACTION=false # debug HTTP API listen address (default: :1635) BEE_DEBUG_API_ADDR=:1635 # enable debug HTTP API BEE_DEBUG_API_ENABLE=true # disable a set of sensitive features in the api BEE_GATEWAY_MODE=false # enable global pinning BEE_GLOBAL_PINNING_ENABLE=false # NAT exposed address BEE_NAT_ADDR= # ID of the Swarm network (default 1) BEE_NETWORK_ID=1 # P2P listen address (default: :1634) BEE_P2P_ADDR=:1634 # enable P2P QUIC protocol BEE_P2P_QUIC_ENABLE=false # enable P2P WebSocket transport BEE_P2P_WS_ENABLE=false # password for decrypting keys BEE_PASSWORD=my-password # path to a file that contains password for decrypting keys BEE_PASSWORD_FILE= # amount in BZZ below the peers payment threshold when we initiate settlement (default 10000) BEE_PAYMENT_EARLY=10000 # threshold in BZZ where you expect to get paid from your peers (default 100000) BEE_PAYMENT_THRESHOLD=100000 # excess debt above payment threshold in BZZ where you disconnect from your peer (default 10000) BEE_PAYMENT_TOLERANCE=10000 # ENS compatible API endpoint for a TLD and with contract address, can be repeated, format [tld:][contract-addr@]url BEE_RESOLVER_OPTIONS=[] # whether we want the node to start with no listen addresses for p2p BEE_STANDALONE=false # enable swap (default true) BEE_SWAP_ENABLE=true # swap ethereum blockchain endpoint (default http://localhost:8545) BEE_SWAP_ENDPOINT=https://rpc.slock.it/goerli # swap factory address BEE_SWAP_FACTORY_ADDRESS= # initial deposit if deploying a new chequebook (default 100000000) BEE_SWAP_INITIAL_DEPOSIT=100000000 # enable tracing BEE_TRACING_ENABLE=false # endpoint to send tracing data (default 127.0.0.1:6831) BEE_TRACING_ENDPOINT=127.0.0.1:6831 # service name identifier for tracing (default bee) BEE_TRACING_SERVICE_NAME=bee # log verbosity level 0=silent, 1=error, 2=warn, 3=info, 4=debug, 5=trace (default info) BEE_VERBOSITY=info # send a welcome message string during handshakes BEE_WELCOME_MESSAGE= EOF done }

echo "创建.env文件" createDockerComposeDotYml echo "创建.env文件成功" ```

用法:复制以上脚本到Windows系统下保存为openMoreSwarm.sh格式的文件,上传到CentOS 7的任意目录,执行命令:

```bash sh openMoreSwarm.sh ```

等待部署成功。脚本默认未自启动脚本,请自行到每个docker-compose.yml文件夹下执行:

```bash docker-compose up -d ```

更多用法见前面的博客:swarm挖矿程序单节点部署脚本(docker),使用docker-compose创建多个swarm挖矿程序,swarm挖矿单节点docker-compose安装流程。

热点:挖矿

« 上一条| 下一条 »
区块链交流群
数藏交流群
区块链币圈-全球区块链数字货币行情、比特币虚拟货币资讯,狗狗币以太坊环保币柚子币莱特币瑞波币等加密数字货币价格非交易行情查询,金色财经巴比特范非小号快讯平台。
趣开心资讯 Qukaixin.cn ©2020-2024版权所有 桂ICP备19010284号-1