首页 > 其他 > 详细

NFS运维二班--梁瑞

时间:2018-09-18 10:50:38      阅读:164      评论:0      收藏:0      [点我收藏+]

 

首先创建两个虚拟机

一个设为服务端

技术分享图片

 

一个设为客户端

技术分享图片

2.服务端:

|---yum install  nfs*

|--yum list | grep nfs

查看端口

|--ss -tunmlp | grep nfs

|--cat /etc/services | grep nfs

|-- ss -tnmlp | grep 2049

技术分享图片

查看服务器状态

|-- systemctl status nfs

 |-- ls /mnt/

 |--mkdir /mnt/share

 |-- vi /etc/exports

编辑文件

/mnt/share   192.168.1.0/24(rw)

w+q保存退出

技术分享图片

 

启动服务

 |-- systemctl restart nfs

 |--systemctl status nfs

关闭防火墙  

|--iptables -F

|--iptables -x

|--iptables -X

 |--setenforce 0

 |-- cat /etc/passwd 000000

  |--ll /mnt/

技术分享图片

 

给权限 

|--chown  -R 757 /mnt/share

|--chmod -R 757 /mnt/share

|--chown -R  root /mnt/share

|--ll /mnt/

|-- ls /mnt/

|--ls /mnt/share/

 |--  ss -tnmlp | grep nfs

 技术分享图片

 

客户端|

|--yum install nfs-utils

|--showmount --help

|--showmount -e 192.168.1.18

技术分享图片

|--df -Th

技术分享图片

|--mkdir /mnt/shareing
|--mount -t nfs 192.168.1.185:/mnt/share /mnt/shareing
|--df -Th

技术分享图片
|--cd /mnt/shareing/
|--ll
|--cd ..
|--ll
|--cd shareing/
|--mkdir ss
|--ll

技术分享图片

-------------------------------------------------------------------------

技术分享图片

技术分享图片

 

NFS运维二班--梁瑞

原文:https://www.cnblogs.com/liangopop123/p/9667123.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!