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                          # 最后,测试一下在客户端的挂载目录上创建文件,在服务端是否也实时同步即可

        

  • 相关阅读:
    23岁的这一年
    迁移ORACLE数据库文件到ASM
    无归档情况下使用BBED处理ORA-01113错误
    Oracle RMAN-06023 和ORA-19693错误
    手工创建Oracle数据库
    使用BBED理解和修改Oracle数据块
    Oracle 11g 重建EM需要删除的对象
    各大主流编程语言-常用爬虫框架以及优劣分析
    pyspider入门
    Centos7上安装docker及使用scrapy-splash
  • 原文地址:https://www.cnblogs.com/pzk7788/p/10211786.html
Copyright © 2011-2022 走看看