Three steps for configuring an NFS server in RHEL5

Source: Internet
Author: User

Network File System (NFS) is an application in Client/Server mode. It allows users to view and store files updated on remote computers as they do on their computers. The NFS server configuration in RHEL5 is mainly divided into three parts. Next we will take a detailed look at how to configure the NFS server in RHEL5.

◆ RHEL5 configure the NFS server test environment
1. A computer with RHEL5 installed;
2. system installation disk;


◆ Configure NFS server test content in RHEL
1. Install the nfs package
2. Configure the nfs server
3. nfs Server Management
4. Client Test


◆ RHEL5 Test Procedure for configuring NFS server:
Step 1: configure the NFS server in RHEL5 and check and install the nfs service package
[Root @ huyb ~] # Rpm-qa | grep nfs-utils
Nfs-utils-1.0.9-16.el5
Nfs-utils-lib-1.0.8-7.2 // nfs-utils is installed by default;
[Root @ huyb ~] # Rpm-qa | grep portmap
Portmap-4.0-65.2.2.1 // portmap is installed by default;

If the system does not install the required software, you can manually install it;
[Root @ huyb ~] # Mount/dev/cdrom/mnt // mount/dev/cdrom/mnt to/mnt of the system;
[Root @ huyb ~] # Cd/mnt/Server // switch the working directory to/mnt/Server;
[Root @ huyb Server] # ls | grep nfs // list nfs-related software packages;
[Root @ huyb Server] # rpm-ivh nfs-utils-1.0.9-16.el5.i386.rpm // install the nfs-utils package;

Step 2: Configure NFS server configuration in RHEL5
The NFS service configuration file is etc/exports.
Exports file content format: <output directory> [client 1 option access permission, user ing, others)] [client 2 Option access permission, user ing, others)]
1. output directory:
The output directory refers to the directory that needs to be shared to the client in the NFS system;

2. Client:
A client is a computer on the network that can access the NFS output directory.
Common Methods for specifying clients
Host 192.168.60.20 with the specified IP Address
All hosts in the specified subnet: 192.168.60.0/24
Host pc1.xyz.net for the specified domain name
All hosts in the specified domain * .xyz.net
All Hosts *

3. Options:
Options are used to set the access permission and user ing of the output directory. NFS has three main options:
Access permission options
Set the output directory read-only ro
Set output directory read/write rw

User ing options
All_squash maps all common users and groups for remote access to an anonymous user or user group nfsnobody );
No_all_squash and all_squash take anti-default settings );
Root_squash maps root users and groups to anonymous users or user groups by default );
No_root_squash and rootsquash;
Anonuid = xxx maps all remotely accessed users to anonymous users, and specifies the user as the local user UID = xxx );
Anongid = xxx maps all remotely accessed user groups to anonymous user group accounts, and specifies the anonymous user group account as the local user group account GID = xxx );

Other options
Secure limits the client to be able to connect to the nfs server from a TCP/IP Port less than 1024 by default );
Insecure allows clients to connect to the server from TCP/IP ports greater than 1024;
Sync writes data to the memory buffer and disk synchronously, which is less efficient but ensures data consistency;
Async stores data in the memory buffer before writing data to the disk if necessary;
Wdelay checks whether there are related write operations. If yes, execute these write operations together, which can improve the efficiency by default );
No_wdelay is executed immediately if there is a write operation, and should be used with sync;
If the subtree output directory is a sub-directory, the nfs server checks the permissions of its parent directory (default setting );
Even if the output directory of no_subtree is a sub-directory, the nfs server does not check the permissions of its parent directory, which improves efficiency;

Step 3: configure the NFS server and NFS server in RHEL5:
[Root @ huyb ~] # Mkdir-p/nfs/public
[Root @ huyb ~] # Mkdir/nfs/huyb
[Root @ huyb ~] # Mkdir/nfs/root
[Root @ huyb ~] # Mkdir/nfs/users
[Root @ huyb ~] # Mkdir/nfs/cdrom
[Root @ huyb ~] # More/etc/exports
/Nfs/public 192.168.1.0/24 (rw, async) * (ro)
/Nfs/huyb 192.168.1.253 (rw, sync)
/Nfs/root * .wn.net (ro, no_root_squash)
/Nfs/users * .wn.com (rw, insecure, all_squash, sync, no_wdelay)
/Mnt/cdrom 192.168.1. * (ro)

NFS is developed by Sun Microsystems and specified as the file server standard. Therefore, configuring the NFS server in RHEL5 is a must. The above is a step of parsing the NFS server configuration in RHEL5, hoping to help you.

  1. Set up the Samba server of ORACLE11g with RHELRHEL 5
  2. Rhelrhel ftp Server SETUP steps and Problem Analysis (1)
  3. RHELRHEL 5 is a perfect combination of FTP
  4. Problem Analysis: in this way, use RHELRHEL 4 to configure Postfix in four perfect steps
  5. Seven steps for RHEL to set up RHEL4 system Sendmail

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.