NFSServer端
1. 安装NFS:yum install nfs-utils rpcbind
2. 创建共享文件:mkdir /data/share
3. 修改配置文件:vi /etc/exports
添加:/data/nfsshare 192.168.1.77(rw,no_root_squash)
4. 启动:
chkconfig nfs on
/etc/init.d/rpcbind start
/etc/init.d/nfs start
5. 关闭防火墙:service iptables stop chkconfigiptables off
NFSClient端
1. 安装NFS:yum install nfs-utils rpcbind
2. 查看能否访问:showmount -e IP
3. 挂载:mount -t nfs 192.168.1.75:/data/nfsshare/attachment /data/attachment
4. 关闭防火墙:service iptables stop chkconfigiptables off
5. 配置开机自动挂载
1. vi /etc/fstab
2. 添加:192.168.1.75:/data/nfsshare/attachment /data/attachment nfs defaults 0 0
3. Reboot