码迷,mamicode.com
首页 > 其他好文 > 详细

NFS运维二班--梁瑞

时间:2018-09-18 11:11:37      阅读:182      评论:0      收藏:0      [点我收藏+]

标签:tab   iptables   etc   art   客户端   服务   --   ble   1.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运维二班--梁瑞

标签:tab   iptables   etc   art   客户端   服务   --   ble   1.0   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!