RHEL5.0 NFS service configuration and application

Source: Internet
Author: User
RHEL5.0 NFS service configuration and application-Linux Enterprise Application-Linux server application information. See the following for details. 1. Overview of the NFS service
NFS was first developed by Sun in 1984 to allow different computer operating systems to share files with each other. NFS is very convenient to use, so it was quickly widely supported by most UNIX/Linux systems and developed by IETE (International Internet Engineering Group) as RFC1904, RFC1813, and RFC3010 standards.

NFS adopts the customer/Server working mode. After the/NFS/public directory is set as the output directory (that is, the shared directory) on the nfs server
The user can mount the directory to a directory in the system. The directory can be different from the output directory on the server and the directory in other clients, in this example, the Mount directories of PC1 and pc2. If a user logs on to the client PC1 and enters the/mnt/nfs Directory, he can see all the subdirectories and files under the/NFS/public directory on the nfs server, if you have the required permissions, you can use commands such as cp, cd, mv, rm, and df to perform operations on disks or files.

To use the NFS service, you must start at least three system daemon processes.
(1) rpc. nfsd
(2) rpc. mountd
(3) portmap

2. Install the NFS service
Run the following command to check whether the two packages have been installed in the system.
Rpm-q nfs-utils portmap

If the system has not installed these two services, you can put 1st installation disks of Red Hat Enterprise Linux 5 into the optical drive. After the optical drive is loaded, you can find the RPM installation package file portmap-4.0-65.2.2.1.i386.rpm of the portmap service and the RPM installation package file nfs-utils-1.0.9-16.el5.i386.rpm of the NFS service under the Server Directory of the CD, and then install the portmap service using the following command.

Rpm-ivh/mnt/Server/portmap-4.0-65.2.2.1.i386.rpm
Run the following command to install the NFS service.
Rpm-ivh/mnt/Server/nfs-utils-1.0.9-16.el5.i386.rpm

3. Start and Stop the NFS service
Start NFS service
/Etc/init. d/portmap start
/Etc/init. d/nfs start
Stop NFS service
/Etc/init. d/nfs stop
/Etc/init. d/portmap stop
Restart the NFS service
/Etc/init. d/nfs restart
Check the status of portmap and nfs services
/Etc/init. d/portmap status
/Etc/init. d/nfs status

Set automatic start of NFS service
For Linux systems in actual use, it is unrealistic to manually start the nfs service after each boot. You should set the system at the specified running level (usually 3 and 5) automatically Start the portmap and nfs services.

Chkconfig -- level 35 portmap on
Chkconfig -- level 35 nfs on

Run the "ntsysv" command to start the service configuration program. Find the "nfs" and "portmap" services, add "*" before them, and select "OK.
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.