ubuntu nfs配置 以及mount.nfs:access denied by server while mounting问题解决
来源:互联网 发布:园林制图软件 编辑:程序博客网 时间:2024/05/19 06:14
ubuntu nfs配置 以及mount.nfs:access denied by server while mounting问题解决
1.安装nfs服务,$ apt-get install nfs-common
nfs-kernel-server
2.配置参数:$ gedit /etc/exports ,内容如下:
# /etc/exports: the access control list for filesystems which may be exported
# to NFS clients. See exports(5).
#
# Example for NFSv2 and NFSv3:
# /srv/homes hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check)
#
# Example for NFSv4:
# /srv/nfs4 gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)
# /srv/nfs4/homes gss/krb5i(rw,sync,no_subtree_check)
#
/home/ygp/nfs *(rw,sync,no_root_squash) #该目录为nfs服务根目录
3.测试
mount -t nfs localhost:/home/ygp/nfs /mnt
cd /mnt 可以看到已经共享/home/ygp/nfs的内容了。
showmount -e......
问题解决:
环境 ubuntu 10.4 vm 7.1
终端
ifconfig 得到 ubuntu资料
INET ADDR 192.168.0.4
BCAST 192.168.0.255
MASK 255.255.255.0
一 安装NFS
$ sudo apt-get install nfs-kernel-server
$ sudo apt-get install nfs-common
二 配置NFS
1 $ sudo dpkg-reconfigure portmap , 对Should portmap be bound to the loopback address? 选N
2 $ sudo /etc/default/portmap 末行清除 "-i 127.0.0.1"
三 配置hosts.deny
$ sudo vi /etc/hosts.deny
文本末添加
### NFS DAEMONS
portmap: ALL
lockd: ALL
mountd: ALL
rquotad: ALL
statd: ALL
四 配置hosts.allow
$ sudo vi /etc/hosts.allow
文本末加入
### NFS DAEMONS
portmap: 192.168.0.
lockd: 192.168.0.
rquotad: 192.168.0.
mountd: 192.168.0.
statd: 192.168.0.
$ sudo /etc/init.d/portmap restart 重启portmap daemon.
显示如下
Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the restart(8) utility, e.g. restart portmap
portmap start/running, process XXXX
五 配置/etc/exports
$ sudo vi /etc/exports
文本末添加
/home/work *(rw,sync,no_root_squash)
chmod 777 -R /home/work
$ sudo showmount -e
显示 clnt-create : RPC : Program not registered
$ sudo exportfs -r 更新
$ sudo showmount 192.168.0.4 -e
显示
Export list for 192.168.0.4:
/home/work *
六 启用
$ sudo /etc/init.d/nfs-kernel-server restart 重启nfs服务
显示如下
* 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/work".
Assuming default behaviour ('no_subtree_check').
NOTE: this default has changed since nfs-utils version 1.0.x
* Starting NFS kernel daemon [ OK ]
挂载
mount -t nfs 192.168.0.4:/home/work /nfsmnt
mount -t nfs 192.168.0.4:/home/work /nfsmnt -o nolock
1.安装nfs服务,$ apt-get install nfs-common
nfs-kernel-server
2.配置参数:$ gedit /etc/exports ,内容如下:
# /etc/exports: the access control list for filesystems which may be exported
# to NFS clients. See exports(5).
#
# Example for NFSv2 and NFSv3:
# /srv/homes hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check)
#
# Example for NFSv4:
# /srv/nfs4 gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)
# /srv/nfs4/homes gss/krb5i(rw,sync,no_subtree_check)
#
/home/ygp/nfs *(rw,sync,no_root_squash) #该目录为nfs服务根目录
3.测试
mount -t nfs localhost:/home/ygp/nfs /mnt
cd /mnt 可以看到已经共享/home/ygp/nfs的内容了。
showmount -e......
问题解决:
环境 ubuntu 10.4 vm 7.1
终端
ifconfig 得到 ubuntu资料
INET ADDR 192.168.0.4
BCAST 192.168.0.255
MASK 255.255.255.0
一 安装NFS
$ sudo apt-get install nfs-kernel-server
$ sudo apt-get install nfs-common
二 配置NFS
1 $ sudo dpkg-reconfigure portmap , 对Should portmap be bound to the loopback address? 选N
2 $ sudo /etc/default/portmap 末行清除 "-i 127.0.0.1"
三 配置hosts.deny
$ sudo vi /etc/hosts.deny
文本末添加
### NFS DAEMONS
portmap: ALL
lockd: ALL
mountd: ALL
rquotad: ALL
statd: ALL
四 配置hosts.allow
$ sudo vi /etc/hosts.allow
文本末加入
### NFS DAEMONS
portmap: 192.168.0.
lockd: 192.168.0.
rquotad: 192.168.0.
mountd: 192.168.0.
statd: 192.168.0.
$ sudo /etc/init.d/portmap restart 重启portmap daemon.
显示如下
Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the restart(8) utility, e.g. restart portmap
portmap start/running, process XXXX
五 配置/etc/exports
$ sudo vi /etc/exports
文本末添加
/home/work *(rw,sync,no_root_squash)
chmod 777 -R /home/work
$ sudo showmount -e
显示 clnt-create : RPC : Program not registered
$ sudo exportfs -r 更新
$ sudo showmount 192.168.0.4 -e
显示
Export list for 192.168.0.4:
/home/work *
六 启用
$ sudo /etc/init.d/nfs-kernel-server restart 重启nfs服务
显示如下
* 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/work".
Assuming default behaviour ('no_subtree_check').
NOTE: this default has changed since nfs-utils version 1.0.x
* Starting NFS kernel daemon [ OK ]
挂载
mount -t nfs 192.168.0.4:/home/work /nfsmnt
mount -t nfs 192.168.0.4:/home/work /nfsmnt -o nolock
- ubuntu nfs配置 以及mount.nfs:access denied by server while mounting问题解决
- mount.nfs:access denied by server while mounting问题解决
- [NFS服务器] mount.nfs: access denied by server while mounting问题解决
- ubuntu 使用nfs服务报错:mount.nfs:access denied by server while mounting
- ubuntu 11.10 nfs mount.nfs:access denied by server while mounting
- 解决mount.nfs:access denied by server while mounting
- mount.nfs: access denied by server while mounting 一个解决办法
- mount.nfs:access denied by server while mounting **原因
- mount.nfs: access denied by server while mounting
- mount.nfs: access denied by server while mounting 一个解决办法
- mount.nfs: access denied by server while mounting 一个解决办法
- mount.nfs: access denied by server while mounting 一个解决办法
- mount.nfs: access denied by server while mounting 一个解决办法
- mount.nfs: access denied by server while mounting 解决办法
- mount.nfs: access denied by server while mounting 一个解决办法
- mount.nfs: access denied by server while mounting 一个解决办法
- mount.nfs: access denied by server while mounting
- mount.nfs: access denied by server while mounting 一个解决办法
- C++内存管理——指针&&数组
- LVS大全
- asp.net c# request.QueryString.Form遇到中文乱码的解决方法,可用
- C语言字符串分割函数
- 多线程程序与单进程程序的架构
- ubuntu nfs配置 以及mount.nfs:access denied by server while mounting问题解决
- 软件开发过程一 需求分析与设计
- 续。。。
- drupal7导入中文出错的解决办法
- Linux下stricmp在此作用域中尚未声明解决办法
- winform 显示PDF文件
- 资料网站汇总
- EM算法The EM Algorithm
- pt px 等之间的转换