ubuntu12.04的NFS配置
安装nfs:
#sudo apt-get install nfs-kernel-server
ubuntu12.04中的已经是最新版本了,无需安装
打开/etc/exports文件,在末尾加入:
/home/kevin *(rw,sync,no_root_squash)
注:nfs允许挂载的目录及权限,在文件/etc/exports中进行定义,各字段含义如下:
/home/kevin:要共享的目录
* :允许所有的网段访问
rw :读写权限
sync:资料同步写入内在和硬盘
no_root_squash:nfs客户端共享目录使用者权限
重启服务:
#sudo /etc/init.d/portmap restart <---重启portmap,
#sudo /etc/init.d/nfs-kernel-server restart <---重启nfs服务
#showmount -e <---显示共享出的目录
注:nfs是一个RPC程序,使用它前,需要映射好端口,通过portmap设定
命令执行情况如下:
kevin@ubuntu:~$sudo /etc/init.d/portmap restart
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service portmap restart
Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the restart(8) utility, e.g. restart portmap
portmap start/running, process 474
kevin@ubuntu:~$sudo /etc/init.d/nfs-kernel-server restart
* Stopping NFS kernel daemon [ OK ]
* Unexporting directories for NFS kernel daemon... [ OK ]
* Exporting directories for NFS kernel daemon...
exportfs: /etc/exports [1]: Neither 'subtree_check' or 'no_subtree_check' specified for export "*:/home/xgc".
Assuming default behaviour ('no_subtree_check').
NOTE: this default has changed since nfs-utils version 1.0.x
[ OK ]
* Starting NFS kernel daemon [ OK ]
kevin@ubuntu:~$showmount -e
Export list for xgc-VirtualBox:
/home/kevin *
现在可以在本机上试一下:
#sudo mount -t nfs localhost:/home/kevin /mnt
注:localhost为本机linux的IP地址
这样就把共享目录挂到了/mnt目录,取消挂载用:
#sudo umount /mnt
如果用在嵌入式设备上挂载,要加上参数-o nolock
我在开发板上使用的挂载命令:
mount -t nfs -o nolock 192.168.1.8:/home/kevin /mnt
ubuntu12.04的NFS配置的更多相关文章
- (转)Ubuntu12.04上NFS Server安装使用过程
原文链接:Ubuntu12.04上NFS Server安装使用过程 实现步骤: 1.服务器端:sudo apt-get install portmap2.服务器端:sudo apt-get insta ...
- ubuntu12.04下NFS链接开发板并测试交叉编译的第一个应用
思路:配置网络->安装NFS->配置NFS->挂载NFS服务->Down文件执行.Okay lets go! 配置网络: 在配置网络之前,首先咱得搞定与开发板的交互工作,那么这 ...
- ubuntu12.04的vim配置
ubuntu12.04中使用的vim的版本不支持像语法高亮和文件类型检测等配置 #sudo apt-get install vim vim默认的配置使用起来还不能让人满意,还需要自己配置默认配置文件是 ...
- UBUNTU12.04下安装配置体验gnome3
年. ubuntu12.04默认采用unity界面,但是自己更加喜欢gnome3的操作方式. 安装gnome3: sudo apt-get install gnome-shell 其实安装成功后,注 ...
- ubuntu12.04安装搜狗输入法配置,安装packettracer字体设置,软件推荐
装上系统,后的各种配置,各种出错之后的解决. 一.安装搜狗输入法 如果系统以前安装了先卸载: sudo apt-get remove fcitx* #删除配置文件 sudo apt-get purge ...
- ubuntu12.04 安装和配置jdk1.7
第一步:下载jdk-7-linux-i586.tar.gz wget -c http://download.oracle.com/otn-pub/java/jdk/7/jdk-7-linux-i586 ...
- Ubuntu12.04安装并配置Sublime Text 2
Ubuntu是个好系统,Sublime Text 是个好编辑器. 下载&安装 个人习惯喜欢到官网下载软件,http://www.sublimetext.com/2 选择合适的包下载回来的格式是 ...
- 阿里云ubuntu12.04环境下配置Apache+PHP+PHPmyadmin+MYsql
此教程中使用的相关IP等设置,在你的环境中要做相应修改. 使用之前更新apt-get,因为服务器基本上是一个裸系统 apt-get update;apt-get upgrade; 1 我们使用root ...
- ubuntu12.04 dnw2 fl2440 配置
1.安装libusb-dev sudo apt-get install libusb-dev 2.dnw2编译配置 源码如下,将其保存为dnw2.c 编译命令 gcc dnw2.c -o dnw2 - ...
随机推荐
- CPU高问题排查
双11大战开始了,这几天公司系统压测,CPU各种报警,于是找了篇关于CPU高问题排查的文章. 一个应用占用CPU很高,除了确实是计算密集型应用之外,通常原因都是出现了死循环. (友情提示:本博文章欢迎 ...
- [转]整理jquery开发技巧
1.创建一个嵌套的过滤器 1.$(jquery).filter(":not(:has(.selected))") //去掉所有不包含class为.selected的元素 2.使 ...
- [ An Ac a Day ^_^ ] hdu 1662 Trees on the level 数据结构 二叉树
紫书上的原题 正好学数据结构拿出来做一下 不知道为什么bfs的队列一定要数组模拟…… 还可以练习一下sscanf…… #include<stdio.h> #include<iostr ...
- UI线程
Application.Current.Dispatcher.Invoke(new Action(() =>))
- ios 将彩色照片转化成黑白等几种类型
-(UIImage *)changeColoursImageTograyScaleImage:(UIImage *)anImage type:(int)type { CGImageRef imageR ...
- B - ACboy needs your help(动态规划,分组背包)
B - ACboy needs your help Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & ...
- ajaxpro——js调用后台的方法
前提:添加并引用类库ajaxpro.dll 1.把引用的类库改为自己(如果是自己的话,就不用修改): <%@ Page Language="C#" AutoEventWire ...
- Python笔记2-20151023
一.循环 Python的循环有两种,一种是for...in循环,依次吧list或tuple中的每个元素迭代出来. >>>names = ['Michael','Bob','Tracy ...
- mysql5.7.16安装
系统:centOS6.5 mysql: 5.7.16 wget http://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.16-linux-glib ...
- 菜鸟认识揭开DLL木马
相信经常玩木马的朋友们都会知道一些木马的特性,也会有自己最喜爱的木马,不过,很多朋友依然不知道近年兴起的“DLL木马”为何物.什么是“DLL木马”呢?它与一般的木马有什么不同? 一.从DLL技术说起 ...