zoukankan      html  css  js  c++  java
  • NFS 配置

    服务端(192.168.216.128)配置:

    [root@localhost ~]$ yum install -y nfs-utils rpcbind    # 安装NFS和RPC
    [root@localhost ~]$ vim /etc/exports                    # 编辑NFS配置文件
    /data  192.168.216.129/32(rw,sync,all_squash,anonuid=1000,anongid=1000)    # 指定要共享的目录,以及要共享给哪些客户端,及客户端的挂载选项
    [root@localhost ~]$ mkdir /data                         # 创建要共享的目录
    [root@localhost ~]$ chmod 777 /data                     # 修改目录权限,这里改成777是为了实验方便,应该要根据实际需求来改
    [root@localhost ~]$ /etc/init.d/rpcbind start           # 启动rpcbind服务
    [root@localhost ~]$ /etc/init.d/nfs start               # 启动nfs服务
    [root@localhost ~]$ chkconfig rpcbind on                # 开机启动rpcbind服务
    [root@localhost ~]$ chkconfig nfs on                    # 开机启动nfs服务

    客户端(192.168.216.129)配置:

    [root@localhost ~]$ yum install -y nfs-utils                   # 安装NFS
    [root@localhost ~]$ showmount -e 192.168.216.128               # 可以查看服务端是否有共享目录,如果出错则表明服务端的rpc服务没有开启,或者没有放通防火墙
    [root@localhost ~]$ mount -t nfs 192.168.216.128:/data /mnt    # 挂载服务端共享的目录,这里把服务端的/data目录挂载到本地的/mnt目录下
    [root@localhost ~]$ df -h                                      # 查看是否已经挂载了服务端共享的目录
    [root@localhost ~]$ touch /data/1.txt                          # 最后,测试一下在客户端的挂载目录上创建文件,在服务端是否也实时同步即可

        

  • 相关阅读:
    使用 cordova-plugin-wechat 分享返回后闪退解决方法
    恢复删除的表
    移动端还原设计图
    js文本差异比较
    windows使用nvm安装nodejs后升级npm报错
    windows添加右键菜单"在此处打开cmd窗口"
    cordova热更新
    js变量提升
    c# 判断字符串是否是日期格式需要注意的一点小问题
    剑指offer_和为S的两个数字
  • 原文地址:https://www.cnblogs.com/pzk7788/p/10211786.html
Copyright © 2011-2022 走看看