# 如何使用vps来进行grass挖矿(中文版) **Published by:** [bin](https://paragraph.com/@bin-7/) **Published on:** 2023-12-21 **URL:** https://paragraph.com/@bin-7/vps-grass ## Content 1、注册链接注册采用邀请制: https://app.getgrass.io/register/?referralCode=BIQDRnaGg2TJVgP2、vps购买vps厂商选择:vultr,cloudcone等等 这里推荐cloudcone,最近在做圣诞特惠活动vps非常便宜 cloudcone链接: https://app.cloudcone.com/?ref=10891 注意:我之后的步骤都是用centos7来配置的,如果你要用其他系统,请酌情修改脚本3、本地终端服务器下载:有xshell,Tabby terminal(开源免费) https://tabby.sh/4、验证分配的ipip验证网站: https://bgp.he.net/ 点击RBL,如果全部显示PASS,说明这个ip能用,否则去找厂商更换ip5、通过ssh连接服务器(cloudcone将ip和密码发在了邮箱中)ssh root@74.xx.xx.xx -p 22 将74.xx.xx.xx替换为你的ip以及输入分配的密码6、建立build.sh脚本(采用搭建docker环境+Chrome headless)6.1 创建build.shvim build.sh # 或者vi build.sh # 将下面的脚本内容复制 # 使用!wq进行保存 build.sh脚本#!/bin/bash # Remove existing Docker packages yum remove -y docker \ docker-client \ docker-client-latest \ docker-common \ docker-latest \ docker-latest-logrotate \ docker-logrotate \ docker-selinux \ docker-engine-selinux \ docker-engine \ docker-ce # Install required dependencies yum install -y yum-utils \ device-mapper-persistent-data \ lvm2 --skip-broken # Add Docker repository and update repository URL yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo sed -i 's|download.docker.com|mirrors.aliyun.com/docker-ce|g' /etc/yum.repos.d/docker-ce.repo # Update repository cache yum makecache fast # Install Docker yum install -y docker-ce # Start Docker service systemctl start docker # Optional: Enable Docker to start on boot systemctl enable docker docker pull camislav/grass docker run -d --name Grass -p 8080:80 -e GRASS_USE=account -e GRASS_PASS=password camislav/grass echo "Docker installation and configuration completed successfully." 注意:这里修改account 和 password为你的账户和密码 6.2 给build.sh赋予执行权限chmod +x build.sh 6.3 执行build.sh脚本./build.sh 7、查看节点运行状态# 查看运行日志 docker logs Grass 当日志为:运行成功日志则说明运行成功 如果为不断的显示 Loading cconnection… 如果这个ip没有问题的话,那么docker restart Grass # 应用重启 ## Publication Information - [bin](https://paragraph.com/@bin-7/): Publication homepage - [All Posts](https://paragraph.com/@bin-7/): More posts from this publication - [RSS Feed](https://api.paragraph.com/blogs/rss/@bin-7): Subscribe to updates