nfs-server安装和端挂盘

安装步骤

1、安装命令

yum install nfs-utils rpcbind -y

2、设置开放文件并且开放权限

chmod 777 /home/share/

3、设置/etc/exports填写如下

/home/share *(rw,sync,no_root_squash)

4、重启nfs-server 和 rpcbind

service nfs-server restart
service rpcbind restart

客户端安装

1、安装命令

yum install nfs-utils (Mac无需安装)

2、Centos挂盘命令

mount -t nfs,vers=3,local_lock=yes 192.168.1.253:/home/share /app 或
mount -t nfs -o nolock 192.168.1.253:/home/share /app

3、Mac挂载(无需安装客户端

sudo mount -o resvport 192.168.1.253:/home/share/ /app

Centos开机启动

vim /etc/rc.d/rc.local
mount -t nfs -o nolock 192.168.1.253:/home/share /app
chmod +x /etc/rc.d/rc.local

猜你喜欢

转载自blog.csdn.net/helenyqa/article/details/127695986