主办IP:129.1.4.189。目标计算机IP:129.1.22.96

1、运行命令:apt-get install nfs-kernel-server ;

2、运行命令:mkdir /tftpboot && chmod 777 /tftpboot 建立NFSserver关联文件夹

3、建立好目录后,接着运行命令:sudo vi /etc/exports 配置nfs

# /etc/exports: the access control list for filesystems which may be exported
# to NFS clients. See exports(5).
#
# Example for NFSv2 and NFSv3:
# /srv/homes hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check)
#
# Example for NFSv4:
# /srv/nfs4 gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)
# /srv/nfs4/homes gss/krb5i(rw,sync,no_subtree_check)
#
/tftpboot *(rw,sync,no_root_squash,no_subtree_check)

4、在文件的最后一行加入:/tftpboot *(rw,sync,no_root_squash,no_subtree_check)

/tftpboot *(rw,sync,no_root_squash,no_subtree_check)这一行的含义是:

/tftpboot与nfs服务client共享的文件夹。这个路径必须和你前面设置的文件的路径一致!

*:同意全部的网段訪问,也能够使用详细的IP

rw:挂接此文件夹的client对该共享文件夹具有读写权限

sync:资料同步写入内存和硬盘

no_root_squash:root用户具有对根文件夹的全然管理訪问权限。

no_subtree_check:不检查父文件夹的权限。

5、改动完上述配置文件保存退出。

6、运行命令:/etc/init.d/rpcbind restart 重新启动rpcbind 服务。

7、运行命令:/etc/init.d/nfs-kernel-server restart 重新启动nfs服务。

nfs是一个RPC程序,使用它前,须要映射好port,通过rpcbind
设定。

8、目标机运行。挂载指令:

mount -t nfs -o nolock 129.1.4.189:/tftpboot /test

附录:NFS经常使用參数例如以下:

ro 仅仅读訪问

rw 读写訪问sync 全部数据在请求时写入共享

async nfs在写入数据前能够响应请求

secure nfs通过1024下面的安全TCP/IPport发送

insecure nfs通过1024以上的port发送

wdelay 假设多个用户要写入nfs文件夹。则归组写入(默认)

no_wdelay 假设多个用户要写入nfs文件夹,则马上写入,当使用async时,无需此设置。

hide 在nfs共享文件夹中不共享其子文件夹

no_hide 共享nfs文件夹的子文件夹

subtree_check 假设共享/usr/bin之类的子文件夹时。强制nfs检查父文件夹的权限(默认)

no_subtree_check 和上面相对,不检查父文件夹权限

all_squash 共享文件的UID和GID映射匿名用户anonymous,适合公用文件夹。

no_all_squash 保留共享文件的UID和GID(默认)

root_squash root用户的全部请求映射成如anonymous用户一样的权限(默认)

no_root_squas root用户具有根文件夹的全然管理訪问权限

anonuid=xxx 指定nfsserver/etc/passwd文件里匿名用户的UID

anongid=xxx 指定nfsserver/etc/passwd文件匿名用户GID

版权声明:本文博主原创文章。博客,未经同意不得转载。

Ubuntu 14.1 构造NFS的更多相关文章

  1. Ubuntu 14.04下NFS安装配置

    1.安装nfs-server # apt-get install nfs-kernel-server 2.建立nfs专用文件夹 # mkdir /data/disk1 3.配置nfs # vi /et ...

  2. Ubuntu 14.04 下NFS安装配置

    1.执行命令:sudo apt-get install nfs-kernel-server; 2.执行命令:mkdir /home/jack/nfs-share 建立一个nfs服务的专有的文件夹; 3 ...

  3. ubuntu 14.04LTS 环境下配置NFS服务

    简言之,NFS(Network FileSystem,网络文件系统)用于在不同机器,不同操作系统之间通过网络互相分享各自的文件.NFS设计之初就是为了在不同的系统间使用,所以它的通讯协议设计与主机及操 ...

  4. 30分钟groovy快速入门并掌握(ubuntu 14.04+IntelliJ 13)

    本文适合于不熟悉 Groovy,但想快速轻松地了解其基础知识的 Java开发人员.了解 Groovy 对 Java 语法的简化变形,学习 Groovy 的核心功能,例如本地集合.内置正则表达式和闭包. ...

  5. Ubuntu 14.04 安装 JDK 8,ubuntu14.04

    第一步,下载Linux版JDK 可以通过访问Oracle官网下载,或者直接通过命令行下载. lxh@ubuntu:~$ wget -c http://download.oracle.com/otn-p ...

  6. 在 Ubuntu 14.04 中配置 PXE 服务器

    PXE(预启动执行环境Preboot Execution Environment)服务器允许用户从网络中启动 Linux 发行版并且可以不需要 Linux ISO 镜像就能同时在数百台 PC 中安装. ...

  7. 【分布式存储】GlusterFS failing to mount at boot with Ubuntu 14.04

    GlusterFS failing to mount at boot with Ubuntu 14.04   Previously I asked about mounting GlusterFS a ...

  8. Ubuntu 14.10 下ZooKeeper+Hadoop2.6.0+HBase1.0.0 的HA机群高可用配置

    1 硬件环境 Ubuntu 14.10 64位 2 软件环境 openjdk-7-jdk hadoop 2.6.0 zookeeper-3.4.6 hbase-1.0.0 3 机群规划 3.1 zoo ...

  9. Ubuntu 14.04中Elasticsearch集群配置

    Ubuntu 14.04中Elasticsearch集群配置 前言:本文可用于elasticsearch集群搭建参考.细分为elasticsearch.yml配置和系统配置 达到的目的:各台机器配置成 ...

随机推荐

  1. Java二叉排序树(转)

    一.二叉排序树定义 1.二叉排序树的定义 二叉排序树(Binary Sort Tree)又称二叉查找(搜索)树(Binary Search Tree).其定义为:二叉排序树或者是空树,或者是满足如下性 ...

  2. hdoj 2602 Bone Collector 【01背包】

    意甲冠军:给出的数量和袋骨骼的数,然后给每块骨骼的价格值和音量.寻求袋最多可容纳骨骼价格值 难度;这个问题是最基本的01背包称号,不知道的话,推荐看<背包9说话> AC by SWS 主题 ...

  3. cocos2d-x于android在call to OpenGL ES API with no current context

    一.问题: 正在使用JNI离Java(Android)侧 打回来C++(Cocos2d-x)该函数返回消息.Cocos2d-x花掉了 看看 Eclipse的Log中.显示 有 call to Open ...

  4. Web Reference for a WCF Service has Extra “IdSpecified” Parameter ?

    Question: I created a WCF service that exposed a method that has one paramater: public class Service ...

  5. CAS实现SSO单点登录原理(转)

    1.      CAS 简介 1.1.  What is CAS ? CAS ( Central Authentication Service ) 是 Yale 大学发起的一个企业级的.开源的项目,旨 ...

  6. ZOJ Monthly, October 2010 ABEFI

    ZOJ 3406 Another Very Easy Task #include <cstdio> #include <cstring> const int N = 10000 ...

  7. Windows8.1和Ubuntu14.04双系统卸载Ubuntu參考教程[图]

    我之前编写并公布了<Windows8.1安装Ubuntu14.04双系统參考教程及双硬盘注意事项>这篇教程,而本文提供的卸载Ubuntu方法适用于这篇教程,其它方法安装的Ubuntu可适当 ...

  8. FreeMarker整合Spring 3(转)

    开发环境: System:Windows WebBrowser:IE6+.Firefox3+ JavaEE Server:tomcat5.0.2.8.tomcat6 IDE:eclipse.MyEcl ...

  9. 微软系统工具套件SysinternalsSuite各个工具功能说明

    下载地址:http://download.sysinternals.com/files/SysinternalsSuite.zip 工具名    工具说明 Accesschk      Windows ...

  10. Androida规划nt打包

    1.准备工作 (1)首先安装好ant工具 (2)生成keystore 在jdk的bin文件夹下 输入 keytool -genkey -alias android.keystore -keyalg R ...