# Shardeum节点中文搭建教程（Linux）

By [Shardeum中文通讯](https://paragraph.com/@daisyfi) · 2023-02-07

---

**本节点教程搭建环境为本地计算机，win10 64位专业版**

1.在windows 10环境下搭建Linux环境
-------------------------

（1）按快捷键win+R后输入cmd后按回车。

![](https://storage.googleapis.com/papyrus_images/eef4d25a72ab881f4e260450dc2d5941b41922b44fe11536eba960ad7cf74dd3.png)

（2）运行命令

`wsl --install`

![](https://storage.googleapis.com/papyrus_images/9dcdc3ffa228d20e9c1b4887f57d015270e7c5b70f4f034e51f78b58a1a84ceb.png)

（3）下载Ubuntu `wsl --list --online`查看所有可用的发行版

![](https://storage.googleapis.com/papyrus_images/1d544671b01a3a9cff0d11fefa2702132926c659c80da467b76bfa89d174587e.png)

您可以通过运行以下命令使用 NAME 安装发行版：

`wsl --install -d Ubuntu-20.04`

![](https://storage.googleapis.com/papyrus_images/e92769d75ee6fa4df0158ce19556f5ac5381e8a3d4447fb986e4b57bde99403d.png)

（4）配置Ubuntu

恭喜，您现在已经在 Windows 机器上运行了一个 Ubuntu 终端！

完成初始设置后，您将需要创建用户名和密码（这不需要与您的 Windows 用户凭据相匹配）。

![](https://storage.googleapis.com/papyrus_images/96fa3e0238fece50574c0e87b4fd7da3a1a18c87b2baa40cea1d8a8b8db0d3bd.png)

最后，使用以下命令安装最新更新始终是一个好习惯，并在出现提示时输入密码。

`sudo apt update`

然后

`sudo apt full-upgrade`

出现提示时按Y。

2.如何在 Shardeum 上运行验证器
---------------------

**第一步：安装**

**安装包管理器**

我们将在本教程中使用 curl 来下载文件，输入以下命令：

`sudo apt-get install curl`

**安装docker**

使用 docker.io 安装 docker

`sudo apt install docker.io`

安装 docker

    sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
    

若是github访问太慢，可以用daocloud下载

    sudo curl -L https://get.daocloud.io/docker/compose/releases/download/1.25.1/docker-compose-`uname -s-uname -m` -o /usr/local/bin/docker-compose
    

docker-compose 的权限设置

    sudo chmod +x /usr/local/bin/docker-compose
    

**第 2 步：下载并安装**

    curl -O https://gitlab.com/shardeum/validator/dashboard/-/raw/main/installer.sh && chmod +x installer.sh && ./installer.sh
    

如果提示

终端将询问有关您的设置设置的问题。 输入 y 以设置基于 Web 的仪表板：

    Do you want to run the web based Dashboard? (y/n): y
    

设置仪表板访问密码：

    Set the password to access the Dashboard: 
    

为基于 Web 的仪表板添加自定义会话端口或按 Enter 端口 8080：

    Enter the port (1025-65536) to access the web based Dashboard (default 8080): 
    

添加自定义路径或安装到根目录：

    What base directory should the node use (defaults to ~/.shardeum): 
    

等待安装过程完成。

第 3 步：打开验证器CLI
--------------

通过运行以下命令确保您位于根目录中：

    cd
    

转到隐藏的 Shardeum 目录：

    cd .shardeum
    

通过运行以下 命令脚本启动 CLI：

    
    ./shell.sh
    

第 4步：打开验证器GUI
-------------

运行：

    
    operator-cli gui start
    

转到您的网络浏览器并转到：

    
    https://localhost:8080/
    

打开页面时，您可能会看到以下内容：

![](https://storage.googleapis.com/papyrus_images/f1341056cb8ec14b477f7a004cb69bb1bfd117e33cd0197d76a8c01e1bf1efc8.png)

忽略此警告并继续访问验证器仪表板。

系统会要求您提供在安装过程中设置的密码。

![](https://storage.googleapis.com/papyrus_images/3cbeeb9ede1923abc00ea0208fff1e02254a1df3237f28d9f1b3c6abe07417c6.png)

您应该会在 Web 浏览器中看到 Shardeum 验证器仪表板的“概述”页面：

![](https://storage.googleapis.com/papyrus_images/03427187c5e9f5bae51d9d8f34859596c0ae5c089406f34615db324d9e534e5f.png)

第 5步：启动
-------

进入““Maintenance”页面，然后点击左上角白框的“Start Node”按钮：

![](https://storage.googleapis.com/papyrus_images/89b7c297954e2a645319cc9218839030b70c35c63ad8297da8ed220c1228f648.png)

第 7 步：将钱包连接到Betanet
-------------------

[https://docs.shardeum.org/Network/Endpoints#connect-wallet](https://docs.shardeum.org/Network/Endpoints#connect-wallet)

第 8 步：从 Betanet Faucet
----------------------

[Sphinx 1.X 的 Shardeum Twitter SHM 水龙头指南](https://docs.shardeum.org/Faucet/Claim#shardeum-faucet-website) (同时你也可以在社区的Faucet-1.0获取)

第 9 步：将 SHM 抵押给验证
-----------------

启动验证器后，转到“Settings”页面。你将被要求连接你的钱包：

![](https://storage.googleapis.com/papyrus_images/ebb00910d3fb1c01029ca0efacf50be6997902ab81920f72cda97df3b94e1018.png)

连接钱包后，您应该会看到以下内容：

![](https://storage.googleapis.com/papyrus_images/cf0062107ea71083b73079ffd44a7d1bc1a07ac38d2728d72ce5671a338d0b6e.png)

当您点击“"Add Stake”时，您将看到以下内容：

![](https://storage.googleapis.com/papyrus_images/ab894cd8e8b3b2e2cb661d1e160ec5b7a8f8370c8497f8d3e21ad4f4308e857f.png)

如果您的节点状态为待命并且您有 10 个或更多的 SHM，则您的验证器节点设置正确。

网络将自动添加您的验证器以在网络中处于活动状态。

添加为活动验证器的时间将根据网络负载和网络中的验证器而有所不同。

完毕，恭喜你成功运行你的节点

---

*Originally published on [Shardeum中文通讯](https://paragraph.com/@daisyfi/shardeum-linux)*
