# IronFish 铁鱼激励测试节点 win11 WSL 搭建

By [ConnorRepeat](https://paragraph.com/@connorrepeat) · 2023-01-31

---

IronFish 激励性测试网正在进行，可参考：[https://testnet.ironfish.network/about](https://testnet.ironfish.network/about) ，记录一篇在 win11 WSL 环境搭建的教程。

目前中文信息里主流推荐的是 nodes.guru 提供的一键脚本，但我在实践中发现 WSL 直接使用多少有些问题，所以这篇选择手动搭建（当然也可以写成脚本）

[https://nodes.guru/ironfish/setup-guide/en](https://nodes.guru/ironfish/setup-guide/en)

打开开始菜单，搜索 PowerShell，右键选择以管理员身份打开

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

使用如下命令检查可用的发行版本

    wsl --list --online
    

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

选择安装 Ubuntu-22.04

    wsl --install Ubuntu-22.04
    

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

稍等会弹出 Ubuntu 22.04 安装窗口，并提示输入用户名和密码，按提示输入完成创建即可，至此 WSL 虚拟机基本环境准备就绪。

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

接下来切换默认用户到 root 用户

    sudo -i
    

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

插一句，在 Ubuntu 窗口标题栏，空白处右键，选择属性，可以勾选复制粘贴快捷键，可以方便复制命令：

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

再插一句，本地 PC 有科学上网条件的，可以在 WSL 中设置代理，加速后续软件包下载。我以 Clash 为例，打开允许局域网，检查端口号，并确定本机的局域网 IP，例如：

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

那么就可以在 Ubuntu 中输入以下命令，使用代理网络：

    export http_proxy="http://192.168.31.175:7890"
    export https_proxy="http://192.168.31.175:7890"
    

继续处理 Ubuntu 环境，第一步是更新软件源：

    apt update && apt upgrade -y
    

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

等待下载安装完成以后继续，安装编译环境套件 ：

    apt install -y build-essential
    

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

接下来安装 nodejs，ironfish 目前要求 18+ 版本，如下命令进行安装：

    curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
    

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

按照提示的建议，安装 yarn，随后正式安装 nodejs，最后检查下 node 版本确认无误

    apt update && apt install yarn -y
    apt install -y nodejs
    node --version
    npm --version
    

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

安装 rust，为编译做准备（rust 安装脚本会要求输入选项，输入1并回车进行安装）

    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
    source $HOME/.cargo/env
    

环境准备到此结束，接下来 clone ironfish 的仓库到本地

    git clone https://github.com/iron-fish/ironfish
    

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

更新安装 yarn

    npm install -global yarn --force
    

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

进入 ironfish 目录，并安装项目依赖

    cd ironfish/
    yarn install
    

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

最后进入 ironfish-cli/bin 目录就可以看到完成的 ironfish 可执行程序

    cd ./ironfish-cli/bin
    ./ironfish help
    

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

至此 win11 WSL 上已经可以成功运行 ironfish 节点，剩余测试网部分，可以参照官方文档进行了

[https://ironfish.network/docs/onboarding/miner-iron-fish](https://ironfish.network/docs/onboarding/miner-iron-fish)

---

*Originally published on [ConnorRepeat](https://paragraph.com/@connorrepeat/ironfish-win11-wsl)*
