安装nfs服务器端步骤
1、安装命令
yum install -y nfs-utils rpcbind
2、设置开放文件并且开放权限
chmod 777 /home/share/
3、设置/etc/exports填写如下
vi /etc/exports
/home/share *(rw,sync,no_root_squash)
4、启动/重启/开启启动 nfs-server 和 rpcbind
#启动
systemctl start nfs-server
systemctl start rpcbind
#重启
systemctl restart nfs-server
systemctl restart rpcbind
#状态
systemctl status nfs-server
systemctl status rpcbind
#开机启动
systemctl enable nfs-server
systemctl enable rpcbind
nfs客户端安装步骤
centos操作系统
1、安装命令
yum install nfs-utils
2、Centos挂盘命令
mount -t nfs,vers=3,local_lock=yes 10.0.10.11:/home/share /app
#或
mount -t nfs -o nolock 10.0.10.11:/home/share /app
10.0.10.11
为服务器端地址
Centos开机启动
vim /etc/rc.d/rc.local
mount -t nfs -o nolock 10.0.10.11:/home/share /app