记录:自建以太坊矿池

学习笔记 专栏收录该内容
10 篇文章 2 订阅

如何制作以太坊采矿池

How to make an Ethereum mining pool

大家好!在本指南中,我将向您展示如何制作您自己的以太坊采矿池!
这将是一个完整的指南,你需要知道的一切,以创建一个成功的矿池。
Hello everybody! In this how to guide I will be showing you how to make your own ethereum mining pool! This will be a full fledged guide with everything you will need to know in order to create a successful pool.

Ethereum Logo

Step 1: [主机]Hosting

为了创建一个池,您需要一个好的VPS主机。我推荐一些好的主机是Linode和DigitalOcean。以下是运行小型矿池所需的最低规格:

In order to make a pool, you will need a good VPS host. Some good hosts that I recommend are Linode and DigitalOcean. Here are the MINIMUM specs required to run a small pool:

1 GB ram
2 CPU cores (you may be able to get away with 1)
Ubuntu 16.04 LTS

您的计算机上还需要以下工具:

puTTY (SSH 客户端)
web浏览器(不是IE浏览器)
像WinSCP这样的工具可能有用,但不是必需的

You will also need the following tools on your computer:

puTTY (SSH client)
A web browser (not internet explorer)
A tool like WinSCP may be helpful, but is not required

Step 2: [设置操作系统]Set Up OS

打开putty并以root用户身份登录到VPS。创建一个新的非root用户并授予其sudo访问权限。然后,以新用户身份登录。不再以root身份登录。
运行以下shell命令更新Ubuntu:

Open up putty and log into your VPS as the root user. Create a new, non root user and give it sudo access. Then, log in as your new user. Never log in as root again.
Run the following shell commands to update Ubuntu:

sudo apt-get update
sudo apt-get dist-upgrade

接下来,创建4GB交换文件:
Next, create a 4GB swap file:

dd if=/dev/zero of=/mnt/myswap.swap bs=1M count=4000
mkswap /mnt/myswap.swap
swapon /mnt/myswap.swap

接下来,编辑文件nano/etc/fstab,并在文件末尾添加以下行:
Next, edit the file nano /etc/fstab, and add the following line to the end of the file:

/mnt/myswap.swap none swap sw 0 0

Step 3: [安装依赖项]Installing Dependencies

运行以下命令:
Run the following commands:

apt-get install git -y
apt-get install build-essential libtool autotools-dev autoconf pkg-config libssl-dev -y
apt-get install libboost-all-dev git npm nodejs nodejs-legacy libminiupnpc-dev redis-server -y
apt-get install libdb4.8-dev libdb4.8++-dev -y
apt-get install golang -y
apt-get install nginx -y

Step 4: [安装以太坊]Install Ethereum

首先,我们需要让Linux知道以太坊的存在,以便它可以为我们安装它。为此,请运行以下命令:
First, we need to let Linux know that Ethereum exists so it can install it for us. To do this, run these commands:

sudo apt-get install software-properties-common -y
sudo add-apt-repository -y ppa:ethereum/ethereum
sudo apt-get update

最后,要安装并启动节点:
And finally, to install and start the node:

sudo apt-get install ethereum
geth account new
geth

Step 5: [编译池]Compile pool

这里是真正的最后冲刺阶段!让我们编译矿池软件:
This is really the home stretch! Let’s compile the pool software:

git config --global http.https://gopkg.in.followRedirects true
git clone https://github.com/sammy007/open-ethereum-pool.git
cd open-ethereum-pool
make

Step 6: [配置并启动池]Configure and start the pool

配置这个矿池非常简单:只需编辑配置.json像以前一样使用nano。所有设置都应清晰并记录在案。
Configuration is very easy with this pool: simply edit config.json using nano like you did before. All settings should be clear and documented.

运行池:
To run the pool:

./build/bin/open-ethereum-pool config.json

Step 7: [Web界面]Web interface

在这一点上,你应该有一个工作池并运行,但我们想要一个web界面,不是吗?
At this point, you should have a working pool up and running, but we want a web interface, don’t we?

输入www目录(cd www),并更改“ApiUrl:”//示例.net/’”以匹配您的域名。
将其他选项也更改为您的环境。
Enter the www directory (cd www), and change “ApiUrl: ‘//example.net/’” to match your domain name. Change the other options to your environment too.

安装EmberJS将数据推送到网站:
Install EmberJS to push data to the website:

npm install -g ember-cli@2.9.1
npm install -g bower
npm install
bower install
./build.sh

我们还需要向Nginx注册我们的目录:
编辑文件/etc/nginx/nginx.conf文件,并添加以下行:
We also need to register our directories with Nginx:
Edit the file /etc/nginx/nginx.conf, and add the following lines:

upstream api {
server 127.0.0.1:8080;
}

在“Location:/”下,添加:
Under Location:/, add:

location /api {
proxy_pass http://api;
}

就这样!你现在应该有一个工作池矿工可以连接!测试所有内容,确保web界面正常工作!
And that’s it! You now should have a working pool where miners can connect! Test everything out and make sure the web interface works!

如果本指南帮助您创建了矿池,请点赞关注
If this guide helped you to create your pool, please give it an up vote!

非常感谢您阅读本文,下次再见!
Thank you so much for reading this far, and see you in the next one!

  • 4
    点赞
  • 8
    评论
  • 44
    收藏
  • 打赏
    打赏
  • 扫一扫,分享海报

©️2022 CSDN 皮肤主题:深蓝海洋 设计师:CSDN官方博客 返回首页

打赏作者

鱼鳔。

你的鼓励将是我创作的最大动力

¥2 ¥4 ¥6 ¥10 ¥20
输入1-500的整数
余额支付 (余额:-- )
扫码支付
扫码支付:¥2
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值