How to install and configure NFS servers in Linux

Source: Internet
Author: User
Article Title: how to install and configure NFS servers in Linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

If the NFS component has been installed by default during Red Hat Enterprise Linux 5 installation, the next step is to configure related files to enable the server to provide the NFS service. The steps are as follows.

(1) set a computer as an NFS server and start the relevant daemon (in "service configuration") in the background ). Generally, if the NFS server is to provide services, the four daemon processes inet, portmap, nfs, and mount must be started and run in the background.

(2) plan server partitions and define which partitions are used as the file system to be shared in terms of security.

(3) define the parameters of each client in the client list.

(4) Modify/etc/exports.

(5) restart the NFS server. You can use the command line method, that is,/etc/rc. d/init. d/nfs restart. There are three ways to share the file system on the server. One is to directly modify the/etc/exports file, the other is to use the exports command to add and delete directories, and the third is the graphical configuration method.

  1. Understand the system structure of NFS network files

The system structure of the NFS network file includes the following directory structure:

1./etc/exports

This file is the main configuration file of NFS, but the system does not have the default value, so this file may not exist. You may need to use vi to create this file. The subsequent settings are only this file.

2./usr/sbin/exportfs

This is the command for maintaining NFS shared resources. We can use it to re-share the directory resources changed by/etc/exports and unmount or re-share the directories shared by the NFS Server. This command is an important part of the NFS system. The command usage will be described later in the following section.

3./usr/sbin/showmount

The showmount command is mainly used on the Client side to view the directory resources shared by NFS.

4./var/lib/nfs/* tab

All the logon files on the NFS server are stored in the/var/lib/nfs/directory, which contains two important logon files: etab, the complete permission settings for the directories shared by NFS are recorded. The other is xtab, which records the client data that has been connected to the NFS host.

[1] [2] [3] [4] Next page

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.