您的位置:首页 > 其它

nfs服务器安装配置

2012-12-31 12:29 197 查看
nfs服务器 netwrok file system 网络文件系统

实现多种网络间共享和装配运程文件

查看是不安装了nfs-utils安装包

方式一:

[root@localhost ~]# rpm -q nfs-utils

nfs-utils-1.0.9-44.el5

方式二:

[root@localhost ~]# rpm -qa | grep nfs

nfs-utils-lib-1.0.8-7.6.el5

nfs-utils-1.0.9-44.el5

安装

rpm **.rpm

yum install ntf-utils

修改配置文件

[root@localhost ~]# vi /etc/exports

添加如下内容

/path/name 192.168.1.100/32 (指定一台主机)*(ro)

/path/name 192.168.1.100/32 (指定一台主机)*(rw,no_root_squash)

/path/name 192.168.1.100/24 (指定网段)

显示配置文件内容

[root@localhost ~]# cat /etc/exports

/home/yue/tmp 192.168.1.23/32 *(ro)

重启服务

[root@localhost ~]# service nfs restart

关闭 NFS mountd: [失败]

关闭 NFS 守护进程: [失败]

关闭 NFS quotas: [失败]

关闭 NFS 服务: [失败]

启动 NFS 服务: exportfs: No options for /home/yue/tmp 192.168.1.23/32: suggest

192.168.1.23/32(sync) to avoid warning

[确定]

关掉 NFS 配额: [确定]

启动 NFS 守护进程: [确定]

启动 NFS mountd: ols)

查看共享目录

[root@localhost ~]# showmount -e localhost

Export list for localhost:

/home/yue/tmp (everyone)

将服务器共享目录挂载到本地目录

mount -t nfs 192.168.1.26:/home/yue/tmp /mnt/tmp
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: