简单NFS的实现
NFS服务器端:
systemctl enable rpcbind nfs.service systemctl start rpcbind nfs.service vim /etc/exports /data/nfs 192.168.0.0/24(rw,sync,root_squash,no_all_squash) mkdir -p /data/nfs/ chown nfsnobody /data/nfs/ exportfs -r exportfs -v /data/nfs 192.168.0.0/24(rw,sync,wdelay,hide,no_subtree_check,sec=sys,secure,root_squash,no_all_squash)
客户端:
showmount -e 192.168.0.7 Export list for 192.168.0.7:/data/nfs 192.168.0.0/24 mkdir /mnt/nfsshare mount -o vers=3,rw,nosuid,fg,hard,intr 192.168.0.7:/data/nfs /mnt/nfsshare/ vim /etc/fstab 192.168.0.7:/data/nfs /mnt/nfsshare nfs vers=3,rw,nosuid,fg,hard,intr 0 0
NFS伪根的实现
NFSv4支持通过挂载NFS服务器的共享“根”,从而浏览NFS服务器上的共享目录列表
NFS服务器:
mkdir -p /data/{nfs1,nfs2} mkdir -p /nfsroot/{nfs1,nfs2} chown nfsnobody /nfsroot/{nfs1,nfs2} vim /etc/fstab /data/nfs1 /nfsroot/nfs1 none bind 0 0 /data/nfs2 /nfsroot/nfs2 none bind 0 0 vim /etc/exports /nfsroot *(fsid=0,rw,crossmnt) /nfsroot/nfs1 192.168.0.0/24(rw) /nfsroot/nfs2 192.168.0.0/24(rw) exportfs -r exportfs -v /nfsroot/nfs1 192.168.0.0/24(rw,sync,wdelay,hide,no_subtree_check,sec=sys,secure,root_squash,no_all_squash) /nfsroot/nfs2 192.168.0.0/24(rw,sync,wdelay,hide,no_subtree_check,sec=sys,secure,root_squash,no_all_squash) /nfsroot <world>(rw,sync,wdelay,hide,crossmnt,no_subtree_check,fsid=0,sec=sys,secure,root_squash,no_all_squash)
NFS客户端:
showmount -e 192.168.0.7 Export list for 192.168.0.7: /nfsroot * /nfsroot/nfs2 192.168.0.0/24 /nfsroot/nfs1 192.168.0.0/24 mount -o rw 192.168.0.7:/ /mnt/ vim /etc/fstab 192.168.0.7:/ /mnt/ nfs rw 0 0
【python】将txt文本内容导入list列表
【python】readlines( )函数的用法,读取文件内容
【python】使用jieba分词并导出txt
【python】module 'jieba' has no attribute 'cut'解决办法
【python】UnicodeDecodeError: 'gbk' codec can't decode byte 0xad in position...解决办法
pip安装python模块时报错,安装失败的解决办法,超详细!(Read timed out.等)
【热力图】区域地图热力图,百度地图api
【XAMPP】 Error: Apache shutdown unexpectedly. 11:00:50 [Apache] 解决办法详细
Linux进入文件夹,查看文件,返回上级目录,查看列表文件(Ubuntu)