NFS Server Setup Guide

Source: Internet
Author: User

1. NFS Server 1.1 installation

RPC Main program: Rpcbind

NFS Main program: Nfs-utils

[Email protected]~] # Rpm-qa | grep rpcbind

[Email protected]~] # RPM-QA | grep NFS

1.2 NFS Security Configuration

Firewall settings, ports for NFS service bindings

[Email protected]~] # Vi/etc/sysconfig/nfs

rquotad_port=875

lockd_tcpport=32803

lockd_udpport=32769

mountd_port=892

statd_port=662

Configure the firewall policy, open the TCP, UDP limit for the above port and 111, 2049 Port (111 is the port number of the RPC, the Service of NFS itself starts on port 2049).

1.3 Construction

1) configuration file/etc/exports

[Email protected]~] # Vi/etc/exports

/wserp/repos * (Rw,sync)

2) Start Rpcbind, NFS, Nfslock

Service Xxxstatus/start (/ETC/INIT.D/XXX)

3) Set Rpcbind, NFS, Nfslock boot

Chkconfig XXX on

1.4 Testing

Connect to view

[[Email protected]~] # showmount–e xxx

1.5 Other instructions

1) After resetting the/etc/exports file, it is not necessary to restart NFS.

# A. Re-mount the settings for/etc/exports once

[Email protected]~] # Exportfs–arv

# B. Uninstall all NFS directory resources that have been shared

[[email protected]~] # EXPORTFS–AUV

2) Shutdown precautions

When the RPC service used by NFS is connected to the server on the client, it may take longer or even several hours for the server to shut down. It is recommended that the NFS server shut down the Rpcbind and NFS two daemon before shutting down, and kill it.


2. NFS Client 2.1 Build

Start the required service Rpcbind, Nfslock, refer to section 1.3.

2.2 Mounting and unloading

1) Set up the mount point and Mount

[Email protected]~] # mount–t NFS Ip:/dir dir

View Post-mount scenarios

[[Email protected]~] # DF

2) Uninstall

[Email protected]~] # umount dir

3) Boot mount

Edit the file /etc/rc.d/rc.localand add the attached command.

NFS Server Setup Guide

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.