zoukankan      html  css  js  c++  java
  • NFS

    服务端:

    [root@linuxprobe ~]# yum install nfs-utils -y
    Loaded plugins: fastestmirror, langpacks
    Loading mirror speeds from cached hostfile
    Package 1:nfs-utils-1.3.0-0.el7.x86_64 already installed and latest version
    Nothing to do
    [root@linuxprobe ~]# systemctl restart rpcbind
    [root@linuxprobe ~]# systemctl enable rpcbind
    [root@linuxprobe ~]# systemctl restart nfs-server
    [root@linuxprobe ~]# systemctl enable nfs-server
    ln -s '/usr/lib/systemd/system/nfs-server.service' '/etc/systemd/system/nfs.target.wants/nfs-server.service'
    [root@linuxprobe ~]# iptables -F
    [root@linuxprobe ~]# service iptables save
    iptables: Saving firewall rules to /etc/sysconfig/iptables:[  OK  ]
    [root@linuxprobe ~]# mkdir /nfsfile
    [root@linuxprobe ~]# ll -d /nfsfile
    drwxr-xr-x. 2 root root 6 Jan 14 08:53 /nfsfile
    [root@linuxprobe ~]# chmod 777 /nfsfile
    [root@linuxprobe ~]# ll -d /nfsfile
    drwxrwxrwx. 2 root root 6 Jan 14 08:53 /nfsfile
    [root@linuxprobe ~]# echo "welcom to linuxprobe.com" > /nfsfile/readme
    [root@linuxprobe ~]# vim /etc/exports
    /nfsfile 192.168.10.*(rw,sync,root_squash)
    [root@linuxprobe ~]# systemctl restart rpcbind
    [root@linuxprobe ~]# systemctl restart nfs-server

    客户端:

    [root@localhost ~]# showmount -e 192.168.10.10
    Export list for 192.168.10.10:
    /nfsfile 192.168.10.*
    [root@localhost ~]# mkdir /nfsfile
    [root@localhost ~]# mount -t nfs 192.168.10.10:/nfsfile /nfsfile
    [root@localhost ~]# cd /nfsfile/
    [root@localhost nfsfile]# ls
    readme
    [root@localhost nfsfile]# cat readme
    welcom to linuxprobe.com
    [root@localhost nfsfile]# vim /etc/fstab
    192.168.10.10:/nfsfile /nfsfile nfs defaults 0 0
    [root@localhost nfsfile]# mount -a 
    [root@localhost nfsfile]# df -h
    Filesystem              Size  Used Avail Use% Mounted on
    192.168.10.10:/nfsfile   18G  3.5G   15G  20% /nfsfile
  • 相关阅读:
    PHP用*号替代姓名除第一个字之外的字符
    苹果笔记本下载的应用打不开或提示损坏怎么办
    codeigniter教程:Codeigniter出现Unable to connect to your databas
    Python3.6.0安装
    某游戏应用的redis 数据库结构设计(转)
    True(False) Positives (Negatives), 召回率和精度定义
    儿童书库
    年轻人必须知道的71个做饭技巧
    20种泡菜做法[3到5天就可以吃了]
    读懂此文——股市就是你的取款机
  • 原文地址:https://www.cnblogs.com/dinghailong128/p/12190273.html
Copyright © 2011-2022 走看看