1.服务端 1.1.查看服务是否安装 [root@localhost ~]# rpm -qa |grep nfs 查看nfs是否安装 [root@localhost ~]# rpm -qa |gr
1.服务端
1.1.查看服务是否安装
.[root@localhost ~]# rpm -qa |grep nfs 查看nfs是否安装
[root@localhost ~]# rpm -qa |grep rpcbind 查看RPC是否安装
1.2.修改nfs配置文件
.[root@localhost ~]# vi /etc/exports
/opt/disk 客户端IP地址(insecure,rw,async,no_root_squash)
1.3.设置目录权限
.chmod o+w /opt/disk
.1.4.启动服务并添加开机启动
.[root@localhost ~]# service nfs start
[root@localhost ~]# service rpcbind start
[root@localhost ~]# chkconfig rpcbind on
[root@localhost ~]# chkconfig nfs on
2.客户端
2.1.挂载磁盘
.[root@localhost ~]# mount -t nfs -o rw 服务端IP地址:/opt/disk /opt/disk
.2.2.添加启动项
.[root@localhost ~]# vi /etc/rc.local
mount -t nfs -o rw 服务端IP地址:/opt/disk /opt/disk