Alpine安装nfs服务

默认分类 · 2023-07-06

安装nfs软件包

apk add nfs-utils

创建共享目录

mkdir /nfs

编辑配置文件/etc/exports,注意网段后面不能有空格,接括号

cat > /etc/exports << EOF
/nfs 192.168.50.0/24(rw,async,root_squash)
EOF

启动nfs服务

rc-service nfs start

设置nfs服务开机自启

rc-update add nfs

查看nfs暴露的目录

alpine:~# showmount -e 127.0.0.1
Export list for 127.0.0.1:
/nfs 192.168.50.0/24
Theme Jasmine by Kent Liao