linux centos5.11安装教程,CentOS 5.11配置NFS服务过程

CentOS 5.11配置NFS服务过程

今天使用CentOS release 5.11 (Final),内核版本2.6.18-406.el5配置NFS服务,用WIN7做客户端;过程如下:

1、查看是否安装portmap和nfs:

[root@localhost test]# rpm -qa|egrep "nfs|portmap"

nfs-utils-1.0.9-71.el5_11

portmap-4.0-65.2.2.1

nfs-utils-lib-1.0.8-7.9.el5

system-config-nfs-1.3.23-2.el5

如果没有安装使用:yum -y install nfs portmap

2、必须先启动portmap,然后再启动nfs启动服务,因为nfs向portmap注册端口:

[root@localhost test]# /etc/init.d/portmap start

Starting portmap: [ OK ]

[root@localhost test]# /etc/init.d/nfs start

Starting NFS services: [ OK ]

Starting NFS quotas: [ OK ]

Starting NFS daemon: [ OK ]

Starting NFS mountd: [ OK ]

3、设置nfsnobody的UID,GID,防止后续权限问题:

usermod -u 65534 nfsnobody

groupmod -g 65534 nfsnobody

usermod -g 65534 nfsnobody

[root@localhost ~]# cat /var/lib/nfs/etab中anonuid=2147483647,anongid=2147483647在此范围之内,

超过均无法写入;

4、向exports写入配置如:

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

#/test 192.168.1.0/24(rw,sync)

#32bit 系统

#/test 192.168.1.0/24(rw,sync,all_squash)

#64bit 5.x 系统

/test 192.168.1.0/24(rw,sync,all_squash,anonuid=65534,anongid=65534)

5、重启服务:

[root@localhost test]# /etc/init.d/nfs reload

6、更改权限:

[root@localhost test]# chown -R nfsnobody /test/

[root@localhost test]# ls -ld /test/

drwxr-xr-x 5 nfsnobody root 4096 Jul 9 15:55 /test/

7、配置客户端win7:

控制面板\所有控制面板项\程序和功能

打开或关闭windows功能

开启NFS服务

在CMD下

C:\>showmount -a 192.168.1.1

所有装入点在 192.168.1.1:

C:\>showmount -e 192.168.1.1

导出列表在 192.168.1.1:

/test 192.168.1.0/24

C:\>mount \\192.168.1.1\test H:

H: 现已成功连接到 \\192.168.1.1\test

命令已成功完成。

至此完成。

http://www.dengb.com/Linuxjc/1030498.htmlwww.dengb.comtruehttp://www.dengb.com/Linuxjc/1030498.htmlTechArticleCentOS 5.11配置NFS服务过程 今天使用CentOS release 5.11 (Final),内核版本2.6.18-406.el5配置NFS服务,用WIN7做客户端;过程如下: 1、查看是否安装p...

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值