侧边栏壁纸
博主头像
落叶人生博主等级

走进秋风,寻找秋天的落叶

  • 累计撰写 130562 篇文章
  • 累计创建 28 个标签
  • 累计收到 9 条评论
标签搜索

目 录CONTENT

文章目录

Linux 搭建NFS磁盘共享服务

2023-12-21 星期四 / 0 评论 / 0 点赞 / 147 阅读 / 1141 字

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 

.

广告 广告

评论区