# Cosmos链上的多链合一的Dapp-Teritori-名牌空投-测试节点搭建

By [rainight-雨夜](https://paragraph.com/@jackmusk) · 2022-07-17

---

大家好我是[雨夜](https://twitter.com/0xrainight) ，专注早期项目交互，不定期发布优质项目的交互教程，欢迎关注我的[推特](https://twitter.com/0xrainight)。

今天给大家带来的项目是[Teritori](https://twitter.com/TeritoriNetwork)， [Teritori](https://twitter.com/TeritoriNetwork) 是Cosmos链上的多链合一的Dapp，目前是测试阶段，现在启动运营活动，明确给早期的社区贡献空投，加入[discord](https://discord.gg/fJtJHB3q7V) 获取早期角色。在Crew3平台上，获得积分积累，等待主网上线获得奖励。

基础操作可以参考 [撸币养家 | lubiyangjia.eth](https://twitter.com/lubi1666) 的教程 [【撸币养家】Cosmos Teritori 去中心化多链合一的Dapp ｜ 明牌空投](https://mirror.xyz/lubiyangjia.eth/nTdlgTc8xII8kw4I4l4RyPS5dNOmLHwhCxltLZv7WXs)

这篇教程主要是**测试节点**的搭建，这也是活动一部分。

开始今天的教程之前，需要有一定的前置条件：

一台ubuntu服务器(最好是国外的服务器，问题会少很多)，最低配置如下

*   CPUs: 2
    
*   RAM: 2GB
    
*   Storage: 50GB
    
*   OS：Ubuntu 22.04
    

**1、使用ssh登录服务器（mac、linux系统下操作**）

    ssh root@服务器ip 
    

回车确认，如果出现提示”Are you sure you want to continue connecting (yes/no/\[fingerprint\])?“

输入 `yes` 回车确认

窗口等待输入服务器密码，回车确认。进入服务器

![运行成功结果](https://storage.googleapis.com/papyrus_images/dc9e70afcfa2bce4cb609a6ac5f54cf4397039ccd3fc5c30cce47c423bf53301.png)

运行成功结果

**2、确认当前用户是root，(如果已经是root用户请略过)**

开启root用户，为root用户创建密码，输入两次密码

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

切换到root用户，在输入刚才创建的密码

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

**3、安转GO环境**

更新服务器现有环境

    apt update && apt upgrade -y 
    

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

安装必须的软件

    apt install build-essential git curl gcc make jq -y
    

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

安装GO1.8

    wget -c https://go.dev/dl/go1.18.3.linux-amd64.tar.gz && rm -rf /usr/local/go && tar -C /usr/local -xzf go1.18.3.linux-amd64.tar.gz && rm -rf go1.18.3.linux-amd64.tar.gz
    

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

设置本地环境变量（方便操作）

    echo 'export GOROOT=/usr/local/go' >> $HOME/.bash_profile
    echo 'export GOPATH=$HOME/go' >> $HOME/.bash_profile
    echo 'export GO111MODULE=on' >> $HOME/.bash_profile
    echo 'export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin' >> $HOME/.bash_profile && . $HOME/.bash_profile
    

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

测试GO安装是否成功

    go version
    

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

**4、安装TERITORI**

创建/opt/teritori 并切换路径到

    mkdir /opt/teritori &&cd /opt/teritori
    

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

下载teritori并安装

    git clone https://github.com/TERITORI/teritori-chain && cd teritori-chain && git checkout teritori-testnet-v2 && make install
    

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

测试teritori是否安装成功

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

**5、配置TERITORI**

初始化teritori（可以将rainight替换成你想用的名称，如：rainight1）

    teritorid init rainight --chain-id teritori-testnet-v2
    

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

设置config 文件

    sed -i.bak 's/persistent_peers =.*/persistent_peers = "2a26f755bc571dd87f81c1149ecc8e4df3569734@138.201.139.175:21096,f21ff30e0d9913be835aa09873b2e9c9418f2d04@62.171.165.171:36656,0b42fd287d3bb0a20230e30d54b4b8facc412c53@176.9.149.15:26656"/' $HOME/.teritorid/config/config.toml
    

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

下载创世纪文件

    wget -O ~/.teritorid/config/genesis.json https://raw.githubusercontent.com/TERITORI/teritori-chain/main/testnet/teritori-testnet-v2/genesis.json
    

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

**6、配置teritori的启动方式**

生产启动配置文件

    tee <<EOF >/dev/null /etc/systemd/system/teritorid.service
    [Unit]
    Description=Teritori Cosmos daemon
    After=network-online.target
    [Service]
    User=$USER
    ExecStart=/$USER/go/bin/teritorid start
    Restart=on-failure
    RestartSec=3
    LimitNOFILE=4096
    [Install]
    WantedBy=multi-user.target
    EOF
    

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

使启动配置生效

    systemctl enable teritorid
    systemctl daemon-reload
    

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

启动teritori

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

停止teritori（安装时不需要使用，等确认不在测试时使用）

     systemctl stop teritorid
    

**7、测试teritori是否启动成功**

    journalctl -u teritorid.service -f -n 100
    

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

有error，请在我[推文](https://twitter.com/0xrainight/status/1548578240192581632)下面留言，我会尽力帮助大家。

**8、创建验证节点信息**

创建账号（hello 可以修改）

    teritorid keys add hello
    

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

输入两次密码（记住密码），获取账号信息（一定要保存好，不让人知道）

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

加入discord，在faucet频道获取测试币

    $request <生产的address>
    

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

查询自己的账户是否收到测试币（需要等一分钟左右）

    teritorid query bank balances <你的address> --chain-id teritori-testnet-v2
    

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

**9、创建验证人**

命令里的中文随意修改，`<hello>` 替换成你创建的名称，`<address>`替换成你的地址

    teritorid tx staking create-validator \
     --commission-max-change-rate=0.01 \
     --commission-max-rate=0.2 \
     --commission-rate=0.05 \
     --amount 1000000utori \
     --pubkey=$(teritorid tendermint show-validator) \
     --moniker=<hello> \
     --chain-id=teritori-testnet-v2 \
     --details="这是一个描述" \
     --security-contact="你的联系邮箱" \
     --website="你的自己的网站" \
     --identity="身份职业" \
     --min-self-delegation=1000000 \
     --from=<address>
    

会需要输入密码

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

输入`y` 回车

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

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

**10、查找自己的节点信息**

访问网站 [https://explorer.ericet.xyz/teritori/staking](https://explorer.ericet.xyz/teritori/staking) ,在红框出查询你的hello是否存在

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

点击你的节点，获取验证链接

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

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

**11、填写认证信息**

访问积分网站 [https://teritori.crew3.xyz/questboard](https://teritori.crew3.xyz/questboard)，选择验证节点卡片，进入填写上一部获取的链接，点击claim。等一段时间就会得到积分。

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

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

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

---

*Originally published on [rainight-雨夜](https://paragraph.com/@jackmusk/cosmos-dapp-teritori)*
