H6{.Nd&w,M(}`MNy0vi /etc/exports #and add:51Testing软件测试网zS7DWU
aa&kW
/home/01_CodecVectors 192.168.1.*(rw,sync,no_root_squash) 192.168.2.*(rw,sync,no_root_squash)
p-?@)A6^R0/tftproot/imx31/ *(rw,no_root_squash)
3i Ag Y"O0/mnt/home/nfsroot 192.168.1.*(rw,sync,no_root_squash) 192.168.2.*(rw,sync,no_root_squash)
Au7gUi4D v0/mnt/ftproot/incoming 192.168.1.*(ro,sync) 192.168.2.*(ro,sync)
7mB2~t"P,d `!Y0/mnt/home/video_codec 192.168.1.*(ro,sync) 192.168.2.*(ro,sync)
W&J[Qe"u0 51Testing软件测试网6]Ls9X3N1uQ_"ao
2tTS;F0S6I0/etc/init.d/nfs restart51Testing软件测试网(^P!J&SwD
Bo
,M(Ie%J4F:p`SZ#L0Or you can use service to start the NFS service.
t`;e7gi
y/mk,p0/sbin/service nfs restart51Testing软件测试网xMXe'?9wa`
51Testing软件测试网-{9BaY\'uc$fgU
1.3 MountNFSfor the Linux system
mkdir /mnf/nfs51Testing软件测试网5Bp.ad$ZF.Br
mount -t nfs -o nolock 10.192.225.215:/01_CodecVectors/ /mnt/nfs51Testing软件测试网({2zcOi0qu
mount -t nfs -o nolock 10.192.225.215:/01_CodecVectors/ /mnt/streams
[9B{4W!t-HCQ0
a k3wW9e$n-jJ0mount -t nfs -o nolock,rsize=1024,wsize=1024 10.192.225.222:/rootfs /mnt/nfs51Testing软件测试网C4g BPN4L_
(AV1j |0w}d0 51Testing软件测试网8U%JW1cg'EgFo
2 Ubuntu操作系统下搭建NFS:
2.1 安装nfs服务器端和客户端
2p"^e)_8MBR2KJ0服务器端:sudoapt-get install portmap nfs-kernel-server51Testing软件测试网&E/t
V3Iw+h
客户机端:sudo apt-get install portmap nfs-common51Testing软件测试网(txQ#P-~7}
2.2 配置共享文件
编辑/etc/exports,在其中增加要共享的目录
R8~/IzT;i0 sudo gedit /etc/exports51Testing软件测试网g(k#[;EL%ww@{
配置
`|j5?_+RnP0 /media/sda6/share *(rw,sync)
'P1Q}#Tt#j0 /media/sda6/share是要共享的目录,*代表允许所有的网络段访问,rw是可读写权限
't)H8@$Z2c^1mj+D)sE0 保存。51Testing软件测试网)bD)r1r,m_
sudo exportfs -ra
R2sck3HF4tCgX2K02.3 重启服务
sudo /etc/init.d/portmap restart51Testing软件测试网4}@%U9c7V!{[
sudo /etc/init.d/nfs-kernel-server restart51Testing软件测试网mM-k
M.L*Rj0G
0N` Z.t+qW(O02.4 服务器安装完之后可以这样测试。
$showmount -e
+f)ihv]'Y0 如果看到这样的信息就说明成功了。51Testing软件测试网+VSml3@7K6~S
boris@NF140:/etc/default$ showmount -e51Testing软件测试网 d0x4eK&dL:c8E
Export list for NF140:
Y h:{-H)t5Y?0 /media/sda6/share *
7[xD+VRR%k0 51Testing软件测试网X]E@1I.y'r_,Trvs
2.5 在客户机端创建用于挂载的目录
sudo mkdir /mnt/share
]I IrdN&](iZ2q0 sudo chmod 777 /mnt/share/
1w%fA+h2r?02.6 客户就可以加载了
sudo mount 172.16.5.140:/media/sda6/share /mnt/share
JqC`elM0 51Testing软件测试网2QOT+{:{
C\c