- 论坛徽章:
- 0
|
利用Linux架设NFS服务器一文,很不错,值得参考
http://www.sofee.cn/blog/2006/09/29/46/
服务器端
NFS服务器分配IP为192.168.1.100
NFS客户端分配IP为192.168.1.200
nfs-server.example.com配置如下:
[root@nfs-server ~]# cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=nfs-server.example.com
[root@nfs-server ~]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
192.168.1.200 nfs-client.example.com nfs-client
默认安装下已经装好NFS服务了,所以只用开启服务器即可。
[root@nfs-server ~]# chkconfig nfs on
比如要共享/data/目录:
[root@nfs-server ~]# mkdir /data
[root@nfs-server ~]# vi /etc/exports
/data/ 192.168.1.200(rw,no_root_squash,no_all_squash,sync)
现在就可以启动NFS服务了。
[root@nfs-server ~]# service nfs start
服务器端结束
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/1914/showart_1824234.html |
|