谢谢,各位百忙之中抽出时间解答我的问题,各位的建议我都试过了,都没有解决问题。我在网上搜了一下,可以通过执行cat /var/log/messages查出具体的原因。这个问题让我纠结了大半个月了,现在和大家分享一下。
第一步:
[root@localhost log]# cat /var/log/messages
.......
Apr 2 15:07:28 localhost mountd[2410]: refused mount request from 192.168.8.100 for /opt/EmbedSky/apps (/): not exported 我的问题原因就在没有将/opt/EmbedSky/apps共享。
第二步:只需要修改/etc/exports,主要添加下面红体字部分
/opt/EmbedSky/root_nfs 192.168.8.*(rw,sync,no_root_squash)
/opt/EmbedSky/apps 192.168.8.*(rw,sync,no_root_squash)
顺便再看看etc/hosts和/etc/sysconfig/network保持不变,内容如下:
etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
/etc/sysconfig/network
NETWORKING=yes
IPv6=no
HOSTNAME=localhost.localdomain
第三步:执行sevice nfs restart重启nfs
第四步:mount -t nfs 192.168.8.100:/opt/EmbedSky/apps /opt/EmbedSky/root_nfs/mnt/apps
第五步:查看是否已将:/opt/EmbedSky/apps 成功挂载到opt/EmbedSky/root_nfs/mnt/apps
[root@localhost apps]# ls
ADC Buttons Hello-C++ OV9650 USB_camera_Test
AV_test cam2jpg IIC_RW pthread-test v4ltest-0.1.2
Backlight cgic205 LED Serial_Test WebCam
Beep EmbedSky_wdg madplay sqlite-3.5.9 wget-1.10.2
boa-0.94.13 Hello-C math-test UDP-Test wireless_tools.29
顺便说一下,我虚拟机装的linux版本是RHEL5 2.6.18。以上内容仅供大家参考,互相学习一下。
|