知乎专栏 | 多维度架构 |
挂载前提是必须安装 fusermount
[root@netkiller test]# yum install fuse
如果没有安装 fusermount 会出如下提示
17:35:29.129 ERROR node: error mounting: fusermount: exec: "fusermount": executable file not found in $PATH mount_unix.go:89
将 ipfs 挂在到本地文件系统,默认目录 /ipfs 和 /ipns。
> mkdir /ipfs /ipns > sudo chown `whoami` /ipfs /ipns > ipfs daemon & > ipfs mount
挂载到指定目录
[root@netkiller ~]# mkdir test [root@netkiller test]# cd test [root@netkiller test]# mkdir ipfs ipns [root@netkiller test]# ipfs mount -f ipfs -n ipns IPFS mounted at: ipfs IPNS mounted at: ipns
检查挂载情况
[root@netkiller test]# mount | grep fuse fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime) /dev/fuse on /root/test/ipfs type fuse (rw,nosuid,nodev,relatime,user_id=0,group_id=0) /dev/fuse on /root/test/ipns type fuse (rw,nosuid,nodev,relatime,user_id=0,group_id=0)
卸载
umount /ipfs umount /ipns