From 1b4186b1b0c1266ee6f789449feb6f1a69e9741c Mon Sep 17 00:00:00 2001 From: smeb y <48400087+a3165458@users.noreply.github.com> Date: Fri, 1 Mar 2024 19:26:44 +0800 Subject: [PATCH] Create Quilibrium.sh --- Quilibrium.sh | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 Quilibrium.sh diff --git a/Quilibrium.sh b/Quilibrium.sh new file mode 100644 index 0000000..9048115 --- /dev/null +++ b/Quilibrium.sh @@ -0,0 +1,50 @@ +#!/bin/bash + + +# 检查是否为root用户执行脚本 +if [ "$(id -u)" != "0" ]; then + echo "该脚本必须以root权限运行" 1>&2 + exit 1 +fi + +# 向 /etc/sysctl.conf 文件追加内容 +echo -e "\n# 自定义最大接收和发送缓冲区大小" >> /etc/sysctl.conf +echo "net.core.rmem_max=600000000" >> /etc/sysctl.conf +echo "net.core.wmem_max=600000000" >> /etc/sysctl.conf + +echo "配置已添加到 /etc/sysctl.conf" + +# 重新加载sysctl配置以应用更改 +sysctl -p + +echo "sysctl 配置已重新加载" + +# Update and Upgrade Ubuntu Packages without any prompts +sudo apt update && sudo apt -y upgrade + +# Install wget, screen, and git without any prompts +sudo apt install git ufw bison screen -y + + +# Install GVM +bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer) +source /root/.gvm/scripts/gvm + + +gvm install go1.4 -B +gvm use go1.4 +export GOROOT_BOOTSTRAP=$GOROOT +gvm install go1.17.13 +gvm use go1.17.13 +export GOROOT_BOOTSTRAP=$GOROOT +gvm install go1.20.2 +gvm use go1.20.2 + +# Clone the repository +git clone https://github.com/quilibriumnetwork/ceremonyclient + +# Navigate to ceremonyclient/node directory +cd ceremonyclient/node + +# Create a screen session and run the command +screen -dmS Quili bash -c 'GOEXPERIMENT=arenas go run ./...'