zoukankan      html  css  js  c++  java
  • 文件共享服务器nfs搭建过程

    网络文件共享服务器192.10.18.132
    yum install -y nfs-utils
    
    在exports文件中添加的从机范围
    vim /etc/exports
    /home/nfs/ 192.10.18.0/24(rw,sync,fsid=0)
    
    rw表示可读写;sync表示同步写,fsid=0表示将/data找个目录包装成根目录
    先为rpcbind和nfs做开机启动:(必须先启动rpcbind服务)
    systemctl enable rpcbind.service
    systemctl enable nfs-server.service
    然后分别启动rpcbind和nfs服务:
    systemctl start rpcbind.service
    systemctl start nfs-server.service
    
    exportfs -r
    #使配置生效
    
    exportfs
    #可以查看到已经ok
    /home/nfs 192.10.18.0/24
    
    
    192.10.18.136
    接着从机
    yum install -y nfs-utils
    
    先为rpcbind做开机启动:
    systemctl enable rpcbind.service
    然后启动rpcbind服务:
    systemctl start rpcbind.service
    注意:客户端不需要启动nfs服务
    
    检查 NFS 服务器端是否有目录共享:showmount -e nfs服务器的IP
    showmount -e 192.10.18.132
    
    cd /home/ && mkdir /nfs
    
    挂载
    mount -t nfs 192.10.18.132:/home/nfs /home/nfs
    
    查看
    df -h
  • 相关阅读:
    SQL中存储过程与自定义函数的区别
    内置函数
    正则表达式
    HTML发展史
    触发器
    事务
    视图
    索引的使用
    存储过程和自定义函数的区别
    游标用法
  • 原文地址:https://www.cnblogs.com/Liang-jc/p/9264405.html
Copyright © 2011-2022 走看看