Fedora 17 x64如何配置nfs服务
2012-07-28 23:10
344 查看
测试环境:
[root@tp system]# uname -a
Linux tp 3.3.4-5.fc17.x86_64 #1 SMP Mon May 7 17:29:34 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
配置nfs exports:
vim /etc/exports
/run/media/k/Elements/unzip/ora11gR2forLinux64 192.168.221.0/24(rw,sync,no_root_squash)
激活exports,可直接用exportfs刷新或者重启服务:
1. exportfs刷新:
[root@tp system]# exportfs -avf
exporting 192.168.221.0/24:/run/media/k/Elements/unzip/ora11gR2forLinux64
2. 重启服务:
[root@tp system]# systemctl restart nfs-server.service
查看本机共享出的nfs文件夹:
[root@tp system]# showmount -e
Export list for tp:
/run/media/k/Elements/unzip/ora11gR2forLinux64 192.168.221.0/24
换台机器挂载nfs文件夹:
[root@rac1 ~]# mount -t nfs 192.168.221.1:/run/media/k/Elements/unzip/ora11gR2forLinux64 /mnt
[root@rac1 ~]# df -h
文件系统 容量 已用 可用 已用% 挂载点
/dev/mapper/VolGroup00-LogVol00
188G 2.7G 176G 2% /
/dev/sda1 99M 23M 71M 25% /boot
tmpfs 2.0G 0 2.0G 0% /dev/shm
/dev/sr0 3.6G 3.6G 0 100% /media
192.168.221.1:/run/media/k/Elements/unzip/ora11gR2forLinux64
932G 806G 127G 87% /mnt
[root@rac1 ~]#
注意问题:
1. 检查配置没有问题后,仍无法发现nfs共享,可以先临时关闭防火墙(systemctl stop iptables.service)和SELINUX(setenforce 0),再试试看。
2. 客户机上能发现nfs共享,并且可以成功mount,但是没有权限列出mount后的目录,需要加no_root_squash到nfs exports选项里,这样客户机能以root权限来查看nfs共享文件夹。
man exports
root_squash
Map requests from uid/gid 0 to the anonymous uid/gid. Note that
this does not apply to any other uids or gids that might be
equally sensitive, such as user bin or group staff.
no_root_squash
Turn off root squashing. This option is mainly useful for disk‐
less clients.
REF:
1. Fedora 17 - NFS Server : Server World
http://www.server-world.info/en/note?os=Fedora_17&p=nfs
[root@tp system]# uname -a
Linux tp 3.3.4-5.fc17.x86_64 #1 SMP Mon May 7 17:29:34 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
配置nfs exports:
vim /etc/exports
/run/media/k/Elements/unzip/ora11gR2forLinux64 192.168.221.0/24(rw,sync,no_root_squash)
激活exports,可直接用exportfs刷新或者重启服务:
1. exportfs刷新:
[root@tp system]# exportfs -avf
exporting 192.168.221.0/24:/run/media/k/Elements/unzip/ora11gR2forLinux64
2. 重启服务:
[root@tp system]# systemctl restart nfs-server.service
查看本机共享出的nfs文件夹:
[root@tp system]# showmount -e
Export list for tp:
/run/media/k/Elements/unzip/ora11gR2forLinux64 192.168.221.0/24
换台机器挂载nfs文件夹:
[root@rac1 ~]# mount -t nfs 192.168.221.1:/run/media/k/Elements/unzip/ora11gR2forLinux64 /mnt
[root@rac1 ~]# df -h
文件系统 容量 已用 可用 已用% 挂载点
/dev/mapper/VolGroup00-LogVol00
188G 2.7G 176G 2% /
/dev/sda1 99M 23M 71M 25% /boot
tmpfs 2.0G 0 2.0G 0% /dev/shm
/dev/sr0 3.6G 3.6G 0 100% /media
192.168.221.1:/run/media/k/Elements/unzip/ora11gR2forLinux64
932G 806G 127G 87% /mnt
[root@rac1 ~]#
注意问题:
1. 检查配置没有问题后,仍无法发现nfs共享,可以先临时关闭防火墙(systemctl stop iptables.service)和SELINUX(setenforce 0),再试试看。
2. 客户机上能发现nfs共享,并且可以成功mount,但是没有权限列出mount后的目录,需要加no_root_squash到nfs exports选项里,这样客户机能以root权限来查看nfs共享文件夹。
man exports
root_squash
Map requests from uid/gid 0 to the anonymous uid/gid. Note that
this does not apply to any other uids or gids that might be
equally sensitive, such as user bin or group staff.
no_root_squash
Turn off root squashing. This option is mainly useful for disk‐
less clients.
REF:
1. Fedora 17 - NFS Server : Server World
http://www.server-world.info/en/note?os=Fedora_17&p=nfs
相关文章推荐
- Fedora 15 x64下如何配置Android 开发环境
- Fedora 17配置NFS (未完成版)
- Fedora 17配置NFS
- 处理Centos5.5 x64 配置NFS服务过程中nfsnobody用户造成的问题
- fedora 14 配置nfs服务
- Fedora14配置NFS服务
- Fedora8中NFS服务的配置
- Ubuntu下如何安装NFS服务及其配置
- fedora 16下配置nfs、ftp服务遇到的两个问题总结,备忘备查,转载请注明出处,商业用途请联系本人
- 如何查看server端(虚拟机Fedora)的nfs服务器有没有配置好
- Fedora 17 开启samba服务配置
- linux fedora core 5如何配置FTP服务和Web服务
- fedora 17 x64如何关闭thinkpad触摸板
- fedora 17 下配置 ssh服务
- Fedora 14下tiny6410配置NFS服务
- CentOS 6.5 系统配置nfs服务
- Fedora 17/Linux如何通过samba挂载windows共享
- 【NFS服务配置实例】
- Fedora 9 NFS配置
- NFS 服务配置