挂载之前先共享该目录:
编辑:vi /etc/exports
实例:
/home/sv22/zhengshi *(rw,sync,no_root_squash,no_all_squash)
/home/impsv/CPSTORAGE *(rw,sync,no_root_squash,no_all_squash)
编辑:vi /etc/samba/smb.conf
实例:
[zhengshi249]
path=/mnt/zhengshi
writeable = yes
browseable = yes
public ok = yes
guest ok = yes
使共享生效:
/etc/init.d/nfsserver start
service portmap start
service nfs start
共享该目录:
mount -t nfs -o soft,intr,timeo=50 192.168.1.100:/home/xwimpsv/cps /mnt/cps
以上命令就是把 192.168.1.100 下面的 /home/xwimpsv/cps 目录,挂载到 /mnt/cps 目录下(执行该命令是在 /mnt/ 目录下)
参考:http://blog.csdn.net/chenjian_0704/article/details/9156309
参考:http://blog.csdn.net/zcclvhong/article/details/6127211