EOS 主网接入简明教程

in cn •  7 years ago  (edited)

@oflyhigh哥的学习热情所激发,我也决定搭建一个EOS节点来接入主网,进行一下学习和测试。
详细的接入过程,可以去看O哥的文章,这里只记录一下简单的步骤,主要使用了CryptoLions提供的Scripts

0x01 VPS购买


目前EOS处于婴儿阶段,对节点的性能要求不高,测试用的话,14 GB 内存应该可以玩很长时间。所以我就在Contabo购买一台第二便宜的VPS,一个月13欧元。

0x02 VPS配置


购买VPS时系统选择了Ubuntu 18.04,需要安装一些常用的工具

# 更新packages
sudo apt-get update && sudo apt-get upgrade
# 安装git
sudo apt-get git
# 配置zsh
sudo apt-get install zsh
sh -c "$(wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
# 安装screen
sudo apt install screen

0x03 EOS源码下载与编译


以下编译操作比较耗时,建议先使用screen新开一个session

mkdir /home/eos-sources  
cd /home/eos-sources/eos  

git checkout mainnet-1.0.5
git submodule update --init --recursive   

./eosio_build.sh  

# 以上过程完成后,可以运行以下命令进行测试
export PATH=${HOME}/opt/mongodb/bin:$PATH
/home/eos-sources/opt/mongodb/bin/mongod -f /home/eos-sources/opt/mongodb/mongod.conf &
cd /home/eos-sources/eos/build; make test

0x04 配置节点


下载一些社区提供的dev scripts

mkdir /opt/EOSmainNet 
cd /opt/EOSmainNet
git clone https://github.com/CryptoLions/EOS-MainNet.git ./ 

由于我不是搭建出块节点,只对config.ini进行了两处修改

  1. server address: p2p-server-address = VPS公网IP:9876
  2. https://eosnodes.privex.io/?config=1 获取的p2p-peer-address替换掉config.ini中的p2p-peer-address

0x05 接入主网


# 启动节点,同步区块可能花费不少时间
./start.sh --delete-all-blocks --genesis-json genesis.json

# 启动本地钱包服务
./Wallet/start_wallet.sh

# 验证是否成功
./cleos.sh get info

0x06 总结


一年前,EOS单机节点刚release的时候,我写过一篇在Mac上的编译EOS的教程

相比之下,EOS 1.0 提供的script使整个过程顺利了好多好多。

接下来打算学习一下EOS的常用命令,有空再分享出来。

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

I do hope EOS is doing well

Same as me!

这个简单明了 👍

跟O哥学习!

  ·  7 years ago 

简直是太牛了

都是copy别人的..

  ·  7 years ago 

EOS - 坐等收钱 :)

怎么收钱呀

技术活,学习学习

一块学习~

好文章,学习了

Let's go EOS!
EOS may change the world! 😉