# 新公链Sui测试网明牌奖励,手把手教你搭建节点 **Published by:** [yog](https://paragraph.com/@yog/) **Published on:** 2022-08-07 **URL:** https://paragraph.com/@yog/sui ## Content 一台 ubuntu 服务器 (最好是国外的服务器,问题会少很多),最低配置如下 ·CPUs: 8 ·RAM: 32GB ·Storage: 180GB ·OS:Ubuntu 22.041、使用 ssh 登录服务器(mac、linux 系统下操作)ssh root@ 服务器 ip回车确认,如果出现提示 "Are you sure you want to continue connecting (yes/no/[fingerprint])?" 输入 yes 回车确认 窗口等待输入服务器密码,回车确认。进入服务器运行成功结果2、确认当前用户是 root,如果已经是 root 用户请略过开启 root 用户,为 root 用户创建密码,输入两次密码sudo passwd root使用下面命令,切换到 root 用户,在输入刚才创建的密码su root3、安装 docker、docker-compose进入服务器后,默认在 ~目录下。创建新目录sui-node/devnet 并进入目录sudo mkdir -p ~/sui-node/devnet && cd ~/sui-node/devnet运行成功结果安装 dockersudo wget -O get-docker.sh https://get.docker.com &&sudo sh get-docker.sh && sudo rm -f get-docker.sh 运行成功结果安装 docker-composesudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose && sudo chmod +x /usr/local/bin/docker-compose 运行成功结果验证 docker、docker-composesudo docker -v sudo docker-compose -v运行成功结果4、下载所需配置文件sudo wget -O fullnode-template.yaml https://github.com/MystenLabs/sui/raw/main/crates/sui-config/data/fullnode-template.yaml sudo wget -O genesis.blob https://github.com/MystenLabs/sui-genesis/raw/main/devnet/genesis.blob sudo wget -O docker-compose.yaml https://raw.githubusercontent.com/MystenLabs/sui/main/docker/fullnode/docker-compose.yaml运行中运行完成后,使用 ls 命令查看是否有 (由于有的服务器没有 ll 命令,这里改成 ls) docker-compose.yaml fullnode-template.yaml genesis.blob 三个文件运行成功结果5、修改配置文件sudo sed -i 's/127.0.0.1:9184/0.0.0.0:9184/' fullnode-template.yaml sudo sed -i 's/127.0.0.1:9000/0.0.0.0:9000/' fullnode-template.yaml运行后使用 cat fullnode-template.yaml 查看文件信息是否如图 6、拉取 docker 文件sudo docker-compose pull运行中成功后显示运行成功结果7、启动节点服务sudo docker-compose up -d运行成功结果8、测试节点是否启动成功curl --location --request POST 'http://127.0.0.1:9000/' \ --header 'Content-Type: application/json' \ --data-raw '{ "jsonrpc":"2.0", "id":1, "method":"sui_getRecentTransactions", "params":[5] }'运行成功结果也可以查看端口是否启用 netstat -ant,如果提示没有命令先使用 apt install net-tools 安装运行成功结果781 设置防火墙、安全组,放行 9000、9184 端口 Google cloud 设置防火墙9、监控节点 访问下发网站https://node.sui.zvalid.com 红框处输入你自己的服务器 ip,点击 CONNECT 按钮运行成功结果下方出现节点信息说明配置成功运行成功结果 ## Publication Information - [yog](https://paragraph.com/@yog/): Publication homepage - [All Posts](https://paragraph.com/@yog/): More posts from this publication - [RSS Feed](https://api.paragraph.com/blogs/rss/@yog): Subscribe to updates - [Twitter](https://twitter.com/Jesus36877877): Follow on Twitter