前端开发入门到精通的在线学习网站

网站首页 > 资源文章 正文

nfs-server安装和端挂盘

qiguaw 2025-04-26 20:29:48 资源文章 4 ℃ 0 评论

安装步骤

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:/data/share /app

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

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

Centos开机启动

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

Tags:

本文暂时没有评论,来添加一个吧(●'◡'●)

欢迎 发表评论:

最近发表
标签列表