])Z4c
H]/C_"jJa0vi /etc/exports #and add:51Testing软件测试网&t8n0l3i5\ER }-LG
/home/01_CodecVectors 192.168.1.*(rw,sync,no_root_squash) 192.168.2.*(rw,sync,no_root_squash)
n+Md
c3{ ^0/tftproot/imx31/ *(rw,no_root_squash)51Testing软件测试网M4y7AaA]
/mnt/home/nfsroot 192.168.1.*(rw,sync,no_root_squash) 192.168.2.*(rw,sync,no_root_squash)
6mzOt2|"v*Hm0/mnt/ftproot/incoming 192.168.1.*(ro,sync) 192.168.2.*(ro,sync)
4s0i"R_9AO*l0/mnt/home/video_codec 192.168.1.*(ro,sync) 192.168.2.*(ro,sync)51Testing软件测试网Lef%|;A Sn
Y"M{!QUh0 51Testing软件测试网X2k@P#_L~.P
/etc/init.d/nfs restart51Testing软件测试网1Z7n~!gS&z9uK
NMt?`0Or you can use service to start the NFS service.
xd\r
j0/sbin/service nfs restart
AW/^,J']%zl0
t-QGcd)cy,o01.3 MountNFSfor the Linux system
mkdir /mnf/nfs
/~UPq
t&t2pfj0mount -t nfs -o nolock 10.192.225.215:/01_CodecVectors/ /mnt/nfs
j&K!T9C.t\7tA0mount -t nfs -o nolock 10.192.225.215:/01_CodecVectors/ /mnt/streams51Testing软件测试网'z2Ee{)[8?a
51Testing软件测试网 AG\
u*M+fQ*B z
mount -t nfs -o nolock,rsize=1024,wsize=1024 10.192.225.222:/rootfs /mnt/nfs
8xv
t"z`P7S9a6q0
N-[8p%p:mYZ@,|0
$?(w,u2r$Lh@02 Ubuntu操作系统下搭建NFS:
2.1 安装nfs服务器端和客户端
)o#DHz0[W%c]0服务器端:sudoapt-get install portmap nfs-kernel-server51Testing软件测试网AB6Mg7wr3P7EwXU
客户机端:sudo apt-get install portmap nfs-common
2Q*~1@2c0gb~$hq02.2 配置共享文件
编辑/etc/exports,在其中增加要共享的目录
8v8y3RGRUce2d2S0 sudo gedit /etc/exports51Testing软件测试网M+cel#Bv.Q$DIQ1cg)r
配置
nEc-`j(mw~%GY0 /media/sda6/share *(rw,sync)
}I7_#Ss_'V7u3_"Y0 /media/sda6/share是要共享的目录,*代表允许所有的网络段访问,rw是可读写权限
A/E:R(o%J-v~(}0 保存。
4bH7y}#Nr)Z e7O.h({0 sudo exportfs -ra
:e!k:{)R2@#X9Q02.3 重启服务
sudo /etc/init.d/portmap restart51Testing软件测试网HRu e:dcbV
c,y1n
sudo /etc/init.d/nfs-kernel-server restart
#v)uY U9\d0O%T&L0 51Testing软件测试网3^;I,^w'w0ks/r
j[^
2.4 服务器安装完之后可以这样测试。
$showmount -e51Testing软件测试网jQ%N2Gl9Lj.N
如果看到这样的信息就说明成功了。51Testing软件测试网/hl1gE W;sa Zp-Oc)g
boris@NF140:/etc/default$ showmount -e
mtiY2`0 Export list for NF140:51Testing软件测试网:c&K%X#o;xi~
/media/sda6/share *51Testing软件测试网5O`V|/o-X~,kE
51Testing软件测试网dA-pJdK(xc!?
2.5 在客户机端创建用于挂载的目录
sudo mkdir /mnt/share51Testing软件测试网wFu'l,O
sudo chmod 777 /mnt/share/51Testing软件测试网,TDw3N w&gJ
2.6 客户就可以加载了
sudo mount 172.16.5.140:/media/sda6/share /mnt/share51Testing软件测试网*qT6_@4t!V4w QA
51Testing软件测试网K VST!g,Ow+|