1.Check whether the capacity of the disk mount path/data is greater than or equal to 500G
df -B G | grep /data | awk '{print $2}'
2.If the capacity of /data is less than 500G, or the capacity is not displayed, you need to increase the hard disk first, and then partition the hard disk (refer to the linux hard disk partition tutorial).
3.Go to the /data directory to download the fsvLinux compressed package and unzip the file
cd /data
yum install wget -y
wget https://dsw3rxqm9wq1x.cloudfront.net/linux/fsv22.12.101.zip
unzip fsv22.12.101.zip
4.Go to the /data/fsv directory
cd fsv
5.Increase execute permission
chmod u+x op.sh fsv fsv_daemon ipfs cosmovisor videochain fs-repo-9-to-10 fs-repo-10-to-11 db/bin/fsv-db
6.Install dependent libraries
yum install libaio psmisc -y
7.starting program
./op.sh start
8.stop the program
./op.sh stop
9.View run log
tail -f daemon.log
or cat daemon.log
./fsv dpos create
Parameter list description:
--min-self-delegation float // DPoS manager's minimum self-delegation amount, nodes below this value will be imprisoned
--name string // The name of the DPoS node DPoS Node Name
--self-delegation float // The amount to be mortgaged by the DPoS manager
--commission-max-change-rate float // The maximum rate that the commission ratio can be adjusted each time
--commission-max-rate float // The upper limit of the maximum adjustable commission ratio
--commission-rate float // commission rate
--contact string // Contact information of the DPoS node
--website string // Site information of the DPoS node
After that, you will be prompted to enter the mnemonic, and after confirmation, the confirmation parameter prompt will be printed. At this time, entering y will initiate a request to create a dpos node on the chain of the current dpos node.
Note:
1. You need to wait for the block of the current node to be synchronized to the latest before you can operate, otherwise it will fail
./fsv dpos unjail
After that, you will be prompted to enter the mnemonic phrase, and after confirmation, a request for on-chain unblocking of the current dpos node will be initiated.
Note:
1. The mnemonic must be the creator of the dpos node
2. Only support the lifting of the current dpos node
3. You need to wait for the block of the current node to be synchronized to the latest before you can operate, otherwise it will fail
./fsv status
Sync Info
LatestBlockHeight: 115828
LatestBlockTime: 2021-10-30 01:05:27.615134076 +0000 UTC
LatestAppHash: 2F453162DD17EA382FEA36E760EDCDCB4A3B57D2F57A8B2065F50FCD8AF30D7F
LatestBlockHash: 90485EB1F671CB4F76984313F1D8E78857528550F200B89D392BA53907945FB9
LatestBlockHeight: 115828
EarliestBlockHeight: 1
EarliestBlockTime: 2021-10-21 16:10:29.9874294 +0000 UTC
EarliestAppHash: E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855
EarliestBlockHash: 738BD289C495EFD1C448A88AEEE165437EE5F95C888AB60C84C47D3BAA07151B
-------------------------------------------------- --------------------
Node Info
ListenAddr: tcp://0.0.0.0:26656
Network: fsv20211021
NodeID: f6cbec7a89c95a73f4dadf0f9b0dced21439456d
-------------------------------------------------- --------------------
Validator Info
Address: D3F19BAF0186AB254BE9E6679DAA6B7992671267
VotingPower: 0
PubKey: jVjAsiR63boOfqc9Npk3w0E1IQNWs+PEQuwebe7UZR0=
ConsAddress: fsvvalcons160cehtcps64j2jlfuenem2nt0xfxwyn8l5dqs8
-------------------------------------------------- --------------------
Sign Info
Jailed Status: nothing
Tombstoned: false
Sign Start Height: 100
Signed blocks: 100
Unsigned blocks: 0
1.It is recommended to deploy a supervisor to monitor the process of FSV. It can also be restarted automatically after an unexpected exit
2.If the following error occurs, it means that the libaio library is not installed.
error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory
You need to run the command separately to install this library:
yum install libaio -y
3.If the following error occurs, it means that the psmisc library is not installed.
killall command error Please check whether it is installed correctly
You need to run the command separately to install this library:
yum install psmisc -y
1. Find the unpartitioned hard disk, pay attention to distinguish the system hard disk and data hard disk,
the red line mark is the path of the hard disk
fdisk -l
2. Hard Disk Partitioning with fdisk
fdisk [The path of the hard disk to be partitioned]
Enter p to view the partition status
3. Enter n to create a partition
4. Enter p to create the primary partition
5. Select the partition number, use the default value here, just press Enter
6. Select the starting sector, use the default value here, just press Enter directly
7. Select the end sector, use the default value here, press Enter directly, and finally enter w to save
8. View partitioned hard disk paths
fdisk -l
The first red box marked the hard disk path
The second red box marked the partition serial number
The combination algorithm is hard disk path + p + partition serial number
Partitioned hard disk path : /dev/nvme0n1p1
9. format hard disk partition
mkfs.ext4 [Partitioned hard disk path]
10. Create /data directory
mkdir /data
11. Mount the partitioned hard disk to the /data path
mount [Partitioned hard disk path] /data
12. Check the mounted status of the partitioned hard disk.
If you can see that /data has been mounted, the execution is successful.
df -B G | grep data
13. Set partitioned hard disk to automatically mount
Update the location of [Partitioned hard disk path] in the code below,
replace it with the actual value, and then copy the following 4 lines of code to the server for execution
export partition=[Partitioned hard disk path]
sed -i -e "/\/data/d" /etc/fstab
echo "${partition} /data ext4 defaults 0 0" >> /etc/fstab
cat /etc/fstab
1.Enter the directory where the fsv is located (such as /data/fsv)
cd /data/fsv
2. Stop an existing program
./op.sh stop
3. Return to the parent directory of the fsv
cd ..
4.Download the smart link linux program
wget https://dsw3rxqm9wq1x.cloudfront.net/linux/fsv22.12.101.zip
5.Unzip the file. If you are prompted whether to overwrite the file, enter A and enter
unzip fsv22.12.101.zip
6.Enter the /data/fsv directory
cd fsv
7.Add execution permission
chmod u+x op.sh fsv fsv_daemon ipfs cosmovisor videochain fs-repo-9-to-10 fs-repo-10-to-11 db/bin/fsv-db
8.Install dependent libraries
yum install libaio psmisc -y
9.Start the program, and then wait for the startup and completion of the upgrade (about 10-30 minutes)
./op.sh start
10.View Run Log
tail -f daemon.log or tail -f log/fsv.log
11.View the running status of the main chain
./videochain status
If the value of LatestBlockHeight in the output content is greater than 5341742, the program has started to work normally to synchronize the block.
1.查看磁盘挂载路径/data的容量是否大于等于 500G
df -B G | grep /data | awk '{print $2}'
2.如果 /data 容量不足500G,或者 没有显示容量, 则需要先增加硬盘,然后对硬盘进行分区(参考linux硬盘分区教程).
3.进入 /data 目录下载fsvLinux压缩包并解压文件
cd /data
yum install wget -y
wget https://dsw3rxqm9wq1x.cloudfront.net/linux/fsv22.12.101.zip
unzip fsv22.12.101.zip
4.进入 /data/fsv 目录
cd fsv
5.增加执行权限
chmod u+x op.sh fsv fsv_daemon ipfs cosmovisor videochain fs-repo-9-to-10 fs-repo-10-to-11 db/bin/fsv-db
6.安装依赖库
yum install libaio psmisc -y
7.启动程序
./op.sh start
8.停止程序
./op.sh stop
9.查看运行日志
tail -f daemon.log 或 cat daemon.log
./fsv dpos create
参数列表说明:
--min-self-delegation float // DPoS管理者最低自抵押金额,低于该值节点将被监禁
--name string // DPoS节点的名称 DPoS Node Name
--self-delegation float // DPoS管理者要抵押的金额
--commission-max-change-rate float // 佣金比例每次可调整的最大幅度
--commission-max-rate float // 最大可调整的佣金比例上限
--commission-rate float // 佣金比例
--contact string // DPoS节点的联系人资料
--website string // DPoS节点的站点资料
之后会提示输入助记词,确认后会打印确认参数提示,此时输入y会发起对当前dpos节点的链上创建dpos节点请求。
注意:
1.需要等待当前节点的区块同步到最新之后才可以进行操作,不然的话会失败
./fsv dpos unjail
之后会提示输入助记词,确认后会发起对当前dpos节点的链上解禁请求。
注意:
1.助记词必须为dpos节点的创建者
2.只支持解禁当前dpos节点
3.需要等待当前节点的区块同步到最新之后才可以进行操作,不然的话会失败
./fsv status
Sync Info
LatestBlockHeight: 115828
LatestBlockTime: 2021-10-30 01:05:27.615134076 +0000 UTC
LatestAppHash: 2F453162DD17EA382FEA36E760EDCDCB4A3B57D2F57A8B2065F50FCD8AF30D7F
LatestBlockHash: 90485EB1F671CB4F76984313F1D8E78857528550F200B89D392BA53907945FB9
LatestBlockHeight: 115828
EarliestBlockHeight: 1
EarliestBlockTime: 2021-10-21 16:10:29.9874294 +0000 UTC
EarliestAppHash: E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855
EarliestBlockHash: 738BD289C495EFD1C448A88AEEE165437EE5F95C888AB60C84C47D3BAA07151B
----------------------------------------------------------------------
Node Info
ListenAddr: tcp://0.0.0.0:26656
Network: fsv20211021
NodeID: f6cbec7a89c95a73f4dadf0f9b0dced21439456d
----------------------------------------------------------------------
Validator Info
Address: D3F19BAF0186AB254BE9E6679DAA6B7992671267
VotingPower: 0
PubKey: jVjAsiR63boOfqc9Npk3w0E1IQNWs+PEQuwebe7UZR0=
ConsAddress: fsvvalcons160cehtcps64j2jlfuenem2nt0xfxwyn8l5dqs8
----------------------------------------------------------------------
Sign Info
Jailed Status: nothing
Tombstoned: false
Sign Start Height: 100
Signed blocks: 100
Unsigned blocks: 0
1.建议部署Supervisor对fsv的进程进行监控,意外退出后也可以自动重启
2.如果出现以下错误,说明没有安装libaio的库。
error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory
需要单独运行命令进行安装这个库:
yum install libaio -y
3.如果出现以下错误,说明没有安装psmisc的库。
killall command error Please check whether it is installed correctly
需要单独运行命令进行安装这个库:
yum install psmisc -y
1. 找到未分区的硬盘,注意区分系统硬盘和数据硬盘,红线标记处为硬盘的路径
fdisk -l
2. 使用fdisk进行硬盘分区
fdisk [待分区硬盘路径]
输入 p 查看分区情况
3. 输入 n 创建分区
4. 输入 p 创建主分区
5. 选择分区号码,这里使用默认值即可,直接按回车enter
6. 选择起始扇区,这里使用默认值即可,直接按回车enter
7. 选择结束扇区,这里使用默认值即可,直接按回车enter,最后输入w进行保存
8. 查看已分区的硬盘路径
fdisk -l
第一个红框标记处为硬盘路径
第二个红框标记处为分区序号
组合算法为 硬盘路径 + p + 分区序号
已分区的硬盘路径 : /dev/nvme0n1p1
9. 格式化硬盘分区
mkfs.ext4 [已分区的硬盘路径]
10. 创建/data目录
mkdir /data
11. 挂载已分区的硬盘到 /data 路径
mount [已分区的硬盘路径] /data
12. 查看已分区的硬盘挂载情况,如果能看到 /data 已经挂载说明执行成功
df -B G | grep data
13. 设置已分区的硬盘自动挂载
更新下方代码处的 [已分区的硬盘路径] 的位置,替换为实际的值,然后复制下面4行代码到服务器中执行
export partition=[已分区的硬盘路径]
sed -i -e "/\/data/d" /etc/fstab
echo "${partition} /data ext4 defaults 0 0" >> /etc/fstab
cat /etc/fstab
1.进入 fsv所在的目录(如/data/fsv)
cd /data/fsv
2. 停止现有程序
./op.sh stop
3. 返回到fsv所在的上级目录
cd ..
4.下载智能链linux程序
wget https://dsw3rxqm9wq1x.cloudfront.net/linux/fsv22.12.101.zip
5.解压文件,如果提示是否要覆盖文件,键盘输入 A 回车即可
unzip fsv22.12.101.zip
6.进入 /data/fsv 目录
cd fsv
7.增加执行权限
chmod u+x op.sh fsv fsv_daemon ipfs cosmovisor videochain fs-repo-9-to-10 fs-repo-10-to-11 db/bin/fsv-db
8.安装依赖库
yum install libaio psmisc -y
9.启动程序,然后等待启动和完成升级(大约 10-30分钟)
./op.sh start
10.查看运行日志
tail -f daemon.log 或者 tail -f log/fsv.log
11.查看主链运行状态
./videochain status
如果输出内容里面 LatestBlockHeight 的值大于 5341742 说明程序已经开始正常工作同步区块.
Method 1:
Move to this directory cd /etc/profile.d/
cd /etc/profile.d/
Create a file
vi fsv.sh
write file content
export FSV_OPEN_API=1
make the file valid
source ./fsv.sh
restart the program
Method 2:
Modify FSV in the directory where the program is located Toml, set under [open_api]
Changed enabled = false to enabled = true
Restart the program to take effect
方法1:
移动到此目录下 cd /etc/profile.d/
/etc/profile.d/
创建文件
vi fsv.sh
写入文件内容
export FSV_OPEN_API=1
使文件生效
source ./fsv.sh
重启程序
方法2:
修改程序所在目录下的fsv.toml,将 [open_api] 下的
enabled = false 改为 enabled = true
重启程序生效