• 在Ubuntu12.04中搭建NFS的步骤


    1.首先安装nfs-kernel-server

    apt-get install nfs-kernel-server 

    2.然后创建一个目录:

    mkdir -p /opt/share 

    并赋予权限777:

    chmod -R 777 /opt/share

    3./etc/exports文件中添加配置:(打开文件的命令:cd /etc/exports)

    /opt/share 10.112.18.0/255.255.255.0(rw,no_root_squash) 

    (说明:rw:挂接此目录的客户端对该共享目录具有读写权限,no_root_squashroot用户具有对根目录的完全管理访问权限。

    /etc/hosts.allow中添加配置:

    portmap:10.112.18.0/255.255.255.0 

    /etc/hosts.deny中添加配置:

    portmap:ALL 

    4.重新启动两个服务(重新启动portmapnfs-kernel-server两个服务):

    service portmap restart 

    service nfs-kernel-server restart

    5.在另一台Ubuntu上安装nfs-common

    apt-get install nfs-common 

    然后创建目录test

    mkdir ~/test 

    然后运行测试命令看一下:

    # showmount -e 10.112.18.158 

    Export list for 10.112.18.158: 

    /opt/share 10.112.18.0/255.255.255.0 

    找到nfs server的挂载目录了。现在手工挂载:

    mount -t nfs4 10.112.18.158:/opt/share ~/test/ 

    让技术改变未来,让技术影响人们生活方式
  • 相关阅读:
    c#缓存技术(Dictionary)
    反射Reflection创建
    SQL Server手注之延时型盲注
    MySQL——事务
    MySQL——NULL值处理
    MySQL——连接的使用
    SQL server手注之报错注入
    SQL Serves手注之联合查询注入
    MySQL手注之ROOT权限处理
    MySQL——正则表达式
  • 原文地址:https://www.cnblogs.com/huangtaiyu/p/5578705.html
Copyright © 2020-2023  润新知