急!!我的操作系统是ubuntu8.04,我照着一些帖子安装了nfs软件包:
nfs-kernel-server (安装时包含nfs-common和portmap),接下来配置了文件:
/etc/ports,在其最后加上我的个共享文件夹目录和权限,如下所示:
/home/zhaohong/nfs *(rw,sync,no_root_squash)
修改了/etc/hosts,内容如下:
#127.0.0.1 localhost
#127.0.1.1 zhaohong-ubuntu
# The following lines are desirable for IPv6 capable hosts
#::1 ip6-localhost ip6-loopback
#fe00::0 ip6-localnet
#ff00::0 ip6-mcastprefix
#ff02::1 ip6-allnodes
#ff02::2 ip6-allrouters
#ff02::3 ip6-allhosts(我一开始禁止了IPV6服务)
最后,修改了网络IP,由DHCP改为固定地址,并且也在终端输入了启动nfs的命令:
root@zhaohong-ubuntu:/home/zhaohong# service portmap start
* Starting portmap daemon... * Already running.... [ OK ]
但是,输入命令service nfs start却出现如下情况:
root@zhaohong-ubuntu:/home/zhaohong# service nfs start
nfs: unrecognized service
无论我再怎么试,都是出现nfs: unrecognized service这一句,我真没有办法了,而且,更为糟糕的是重新启动操作系统的时候,当进度指示器填充到约为1/4处时,系统却自动切换到了字符提示界面:有如下提示:
------------以上略-----------------
* checking root file system... [OK]
1184
fsck 1.40.8(12-Mar-2008)
/dev/sda11:clean,274524/3866624 files,1705871/3865632 blocks
* Exporting directories for NFS kernel daemon...
exports:/etc/exports [1]:Neither 'subtree_check' or ' no_subtree_check' specified
for export " *:/home/zhaohong/nfs".
Assuming default behaviour ('no_subtree_check').
Note: this default has changed since nfs-utils version 1.0.x
* starting NFS kernel daemon [OK]
然后,就卡在这里,等待大概4分钟左右才进入启动输入图形欢迎界面,但是启动之后,在终端输入命令:
service nfs start 还是老样子
root@zhaohong-ubuntu:/home/zhaohong# service nfs start
nfs: unrecognized service
我再输入:service nfs status得到提示为:
nfs: unrecognized service
我输入别的命令,想重新启动一下它们:
root@zhaohong-ubuntu:/home/zhaohong# /etc/init.d/portmap restart
* Stopping portmap daemon... [ OK ]
* Starting portmap daemon... [ OK ]
root@zhaohong-ubuntu:/home/zhaohong# /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/zhaohong/nfs".
Assuming default behaviour ('no_subtree_check').
NOTE: this default has changed since nfs-utils version 1.0.x
[ OK ]
* Starting NFS kernel daemon [ OK ]
可是,再输入命令查询状态,还是那句话: nfs: unrecognized service,搞了我一整天了,一点进展都没有,只好在这里求助大家了,跪求高手的解答,我谢谢了!我的QQ:627405172 e-mail:bwm_007@163.com
