NFS搭建

启动两台虚拟机分别为LAMP-01(此虚拟机为成功搭建网盘的)和rhel-02,并配好ip与yum源
一、关闭两台防火墙
二、在rhel-02中配置如下
1、列出nfs
[root@rhel-02 ~]# yum list | grep nfs

2、安装nfs所有服务

[root@rhel-02 ~]# yum install nfs*

完成安装如下图:

3、启动nfs服务并查看状态

[root@rhel-02 ~]# systemctl start nfs

[root@rhel-02 ~]# systemctl status nfs

4、查看端口:

[root@rhel-02 ~]# cat /etc/services | grep nfs

5、在mnt下创建share文件夹和修改exports文件内容

[root@rhel-02 ~]# mkdir /mnt/share

 [root@rhel-02 ~]# vi /etc/exports

6、重启nfs服务并查看状态

[root@rhel-02 ~]# systemctl restart nfs

[root@rhel-02 ~]# systemctl status nfs

7、修改share权限

[root@rhel-02 ~]# chmod -R 757 /mnt/share

三、在LAMP-01中配置如下

 1、安装nfs-utils服务

[root@LAMP-01 ~]# yum install nfs-utils

安装完成如下图:

2、显示NFS服务器的输出清单

[root@LAMP-01 ~]# showmount -e  192.168.1.113(rhel-02IP) 

3、挂载

[root@LAMP-01 ~]# mount -t nfs 192.168.1.112:/mnt/share   /mnt/shareing

4、拷贝一个文件到shareing下查看结果

[root@LAMP-01 ~]# cp owncloud-10.0.4.zip   /mnt/shareing

 

转载于:https://www.cnblogs.com/ATMA/p/9663115.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值