debian NFS服务器架设

来源:互联网 发布:java反射机制原理 编辑:程序博客网 时间:2024/05/16 19:13
1、安装软件包
apt-get install nfs-kernel-server nfs-common portmap

2、配置NFS服务器
在/etc/exports中添加如下行
/ 192.168.0.5(rw,sync,no_root_squash)
"/"共享目录 "192.168.0.5"授权IP, "rw"可读写 "sync"同步 "no_root_squash"默认

给root权限

3、NFS客户端挂载共享目录
mount -t nfs -o nolock 192.168.0.3:/ /mnt/nfs
"192.168.0.3:/"挂载192.168.0.3 NFS服务器的/目录, 挂载在本机的/mnt/nfs目录

其他可能用到的资料
./etc/init.d/portmap  restart
./etc/init.d/nfs-common restart
./etc/init.d/nfs-kernel-server restart

配置
编辑/etc/default/portmap

配置/etc/hosts.deny
(禁止任何host(主机)能和你的NFS服务器进行NFS连接),加入:
### NFS DAEMONS
portmap:ALL
lockd:ALL
mountd:ALL
rquotad:ALL
statd:ALL

配 置/etc/hosts.allow
允许那些你想要的主机和你的NFS服务器建立连接。下列步骤将允许任何IP地址以

192.168.0开头的主机(连 接到NFS服务器上),也可以指定特定的IP地址。参看man

页 hosts_access(5), hosts_options(5)。加入:
### NFS DAEMONS
portmap: 192.168.0.
lockd: 192.168.0.
rquotad: 192.168.0.
mountd: 192.168.0.
statd: 192.168.10.

/etc/hosts.deny 和 /etc/hosts.allow 设置对portmap的访问. 采用这两个配置文件

有点类似"mask"的意思. 现在/etc/hosts.deny中禁止所有用户对portmap的访问. 再

在/etc/hosts.allow 中允许某些用户对portmap的访问.
阅读(405) | 评论(0) | 转发(0) |
0

上一篇:debian 5常用软件包名称,及安装方法

下一篇:debian 架设ssh服务器

相关热门文章
  • linux 常见服务端口
  • 【ROOTFS搭建】busybox的httpd...
  • 什么是shell
  • linux socket的bug??
  • linux的线程是否受到了保护?...
  • 修改默认端口为222,centos自...
  • 用PHP做一个ftp登录页面...
  • Toad for Oracle工具,为什么在...
  • 本地win7安装vmw9系统winserv...
  • powermt config是所什么用的...
给主人留下些什么吧!~~
原创粉丝点击