搭建自己去中心化的网站,使用IPFS如何操作?
放弃六月们
post on 2022-12-13 02:01:12
11
0
0
安装: ipfs软件 https://dist.ipfs.io/#go-ipfs 根据操作系统下载对应的版本,linux上解压:
tar xvfz go-ipfs.tar.gz mv go-ipfs/ipfs /usr/local/bin/ipfs
测试是否安装成功,如果有信息出来说明成功:
ipfs help安装go ,只支持go 1.7之后的版本,先解压,然后移动文件夹tar zxvf go1.8.3.linux-amd64.tar.gzmv go /usr/local/
修改配置文件
vim /etc/profile
添加如下内容:
export PATH=$PATH:/usr/local/go/
bin export GOROOT=/usr/local/go
source /etc/profile
go version安装 ipfs-update
https://dist.ipfs.io/#ipfs-update
tar ipfs-update.tar.gz
cd ipfs-update
./install.sh
获取最新的更新包,并且更新
ipfs-update
ipfs-update install latest
最新的不一定是稳定的,所以用
ipfs-update install v0.4.6初始化: 需要先创建目录 /path/to/ipfsrepoipfs init启动本地服务,连接到ipfs网络,假如自己的网页放在folder文件夹:ipfs daemonipfs add -r folder/
此时会生成一串文件夹的hash值,将它缓存到ipfs上,这样别的ipfs节点就可以访问了
ipfs pin add-r QmcKi2ae3uGb1kBg1yBpsuwoVqfmcByNdMiZ2pukxyLWD8
BitMere.com is Information release platform,just provides information storage space services.
The opinions expressed are solely those of the author,Does not constitute advice, please treat with caution.
The opinions expressed are solely those of the author,Does not constitute advice, please treat with caution.
Write the first review