近两年内发行的Linux发行版本,包括但不限于Debian,Ubuntu,Centos。
推荐Debian9+,Centos7+
正式主节点,推荐32G Ram+4 Core,固态硬盘500G起步;
每年5T增量
Rippled版本
正式版v1.5.0
↓一下以Debian10为演示:
前提工作
稳定的网络。
设置环境变量
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
sudo apt -y update
sudo apt -y install apt-transport-https ca-certificates wget gnupg
wget -q -O - "https://repos.ripple.com/repos/api/gpg/key/public" | sudo apt-key add -
echo "deb https://repos.ripple.com/repos/rippled-deb buster stable" >/etc/apt/sources.list.d/ripple.list
#检查(optional)
cat /etc/apt/sources.list.d/ripple.list
sudo apt -y update
sudo apt -y install rippled
sudo systemctl start rippled.service
sudo systemctl enable rippled.service
cat << REPOFILE | sudo tee /etc/yum.repos.d/ripple.repo
[ripple-stable]
name=XRP Ledger Packages
baseurl=https://repos.ripple.com/repos/rippled-rpm/stable/
enabled=1
gpgcheck=0
gpgkey=https://repos.ripple.com/repos/rippled-rpm/stable/repodata/repomd.xml.key
repo_gpgcheck=1
REPOFILE
sudo yum -y update
sudo yum install rippled
sudo systemctl daemon-reload
sudo systemctl enable rippled
sudo systemctl start rippled
#-或手动安装-----------
wget https://repos.ripple.com/repos/rippled-rpm/stable/rippled-1.5.0-1.el7.x86_64.rpm
#1.6版本↓
wget https://repos.ripple.com/repos/rippled-rpm/stable/rippled-1.6.0-1.el7.x86_64.rpm
tips:利用pget多线程下载,立马下载完毕 (或者用axel多线程下载器)
pget.zip
(2.2 MB)
./pget -p=128 https://repos.ripple.com/repos/rippled-rpm/stable/rippled-1.5.0-1.el7.x86_64.rpm
https://mirrors.ripple.com/rpm/el7/stable/x86_64/
/opt/ripple/bin/validator-keys create_keys
/opt/ripple/bin/validator-keys create_token --keyfile /root/.ripple/validator-keys.json
###复制[validator_token]下面的字符
##粘贴到/opt/ripple/etc/rippled.cfg 的[validator_token]指令下面
#单独写,非全量服务节点
#配置交易历史
[node_db]
# Other settings unchanged ...
online_delete=512000
advisory_delete=0
[ledger_history]
10240
#full
[voting]
reference_fee = 20
account_reserve = 0
owner_reserve = 20
#交易费用,账户保留,信任网关第一次设置初始化后,再次修改都无效,以第一次的值为主
创世转账单位是:枚
/opt/ripple/etc
###瑞博配置文件
/var/lib/rippled/db
#db数据保存路径
操作
第一次启动/opt/ripple/bin/rippled --debug -v --start --conf /etc/opt/ripple/rippled.cfg
第N次启动/opt/ripple/bin/rippled --debug -v --net --conf /etc/opt/ripple/rippled.cfg
send_queue_limit=10240
#websocket发送队列
[transaction_queue]
ledgers_in_queue=1024
minimum_queue_size=100000
#测试请忽略
{
"result" : {
"status" : "success",
"validation_key" : "DUET SITS CON STAG CROW NINE HAWK TUNA AM HOME KONG OH",
"validation_private_key" : "patdv4yHtku9wE9qFcDTuc6g8HceeLgsHyre8nJWijWJv3byHx4",
"validation_public_key" : "n9KhSkxdUgCN1zFQZGbZJB1ecGvjEwevT1et4fBoVen7Ep21bYQN",
"validation_seed" : "ssz1Lcn35EwuiVKTZu7gdB2epiVvJ"
}
}
#测试请忽略
测试命令
--replay --load
accept_ledger
nmcli d
networkManager
curl --insecure https://localhost:51235/crawl
image.png
image.png
一键启动脚本
#!/bin/sh
nohup /usr/local/bin/rippled -v --net --conf=/root/ripplecfg1/rippled1.cfg >>/dev/null &
nohup /usr/local/bin/rippled -v --net --conf=/root/ripplecfg1/rippled2.cfg >>/dev/null &
nohup /usr/local/bin/rippled -v --load --conf=/root/ripplecfg1/rippled3.cfg >>/dev/null &
nohup /usr/local/bin/rippled -v --net --conf=/root/ripplecfg1/rippled4.cfg >>/dev/null &
nohup /usr/local/bin/rippled -v --net --conf=/root/ripplecfg1/rippled5.cfg >>/dev/null &
exit 0
设置开放防火墙
iptables -I INPUT -p tcp --dport 80 -j ACCEPT
iptables -I INPUT -p tcp --dport 443 -j ACCEPT
iptables -I INPUT -p tcp --dport 50000:59999 -j ACCEPT
iptables -I INPUT -p tcp --dport 60000:60100 -j ACCEPT
iptables-save
cat /etc/sysconfig/iptables-config
链接伙伴节点
rippled -v --conf /home/xxx/rippled/rippled4.cfg connect 127.0.0.1 51236