CentOS5.11 configure the NFS service process

Source: Internet
Author: User
Tags egrep
Today, we use CentOSrelease5.11 (Final), kernel version 2.6.18-406. el5 configures the NFS service and uses WIN7 as the client. The process is as follows: 1. check whether portmap and nfs are installed: [root @ localhosttest] # rpm-qa | egrep & quot; nfs | portmap & quot; nfs-utils-1.0.9-71.el5_11

Today, we use CentOS release 5.11 (Final) and kernel version 2.6.18-406. el5 to configure the NFS service and use WIN7 as the client. The process is as follows:

1. check whether portmap and nfs are installed:

[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

If not installed and used: yum-y install nfs portmap

 

2. you must first start portmap and then start nfs to start the service, because nfs registers a port with 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. set the nfsnobody UID and GID to prevent subsequent permission issues:

Usermod-u 65534 nfsnobody

Groupmod-g 65534 nfsnobody

Usermod-g 65534 nfsnobody

 

[Root @ localhost ~] # In cat/var/lib/nfs/etab, anonuid = 2147483647 and anongid = 2147483647 are in this range,

Cannot be written if it exceeds the upper limit;

 

4. write configurations to exports, such:

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

 

#/Test 192.168.1.0/24 (rw, sync)

# 32bit system

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

# 64bit 5.x system

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

 

 

 

5. restart the service:

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

 

6. change permissions:

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

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

Drwxr-xr-x 5 nfsnobody root 4096 Jul 9/test/

 

7. configure client win7:

Control panel \ all Control Panel Items \ programs and functions

Enable or disable windows

Enable NFS service

Under CMD

C: \> showmount-a 192.168.1.1

All mount points are at 192.168.1.1:

C: \> showmount-e 192.168.1.1

The export list is at 192.168.1.1:

/Test 192.168.1.0/24

 

C: \> mount \ 192.168.1.1 \ test H:

H: connected to \ 192.168.1.1 \ test

 

The command is successfully completed.

 

So far.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.