RedHatEnterpriseLinux5 Configure NFS server

Source: Internet
Author: User
1. first check whether the nfs-utils installation package is installed, command: # rpm-qnfs-utils display nfs-utils-1.0.9-24.el5 is already installed 2. if the nfs-utils installation package is not installed, find and install the nfs-utils installation package from the installation disc of the corresponding Linux operating system. Command: # rpm-ivhnf

1. Check whether the nfs-utils installation package is installed,
Command: # rpm-q nfs-utils

Show nfs-utils-1.0.9-24.el5 as installed

2. If the nfs-utils installation package is not installed, find and install the nfs-utils installation package from the installation disc of the corresponding Linux operating system version.
Command: # rpm-ivh nfs-utils-1.0.9-24.el5.i386.rpm

3. Configure NFS and add the directories and access permissions that are allowed to be accessed and accessed by computers.

Command: # vi/etc/exports

Add the following Under vi:/Home 192.168.5. * (rw, sync, no_root_squash)

/Home: directory that allows access by other computers

192.168.5. *:Client IP Address

Rw: read/write

Sync: Synchronous write disk (async: data will be saved in the memory first, rather than directly written to the hard disk)

No_root_squash: indicates that the root user of the client has the write permission on the directory.

4. Start the NFS server
Command: #/etc/init. d/nfs restart

Shown below as successful

Shutting down NFS mountd: [OK]

Shutting down NFS daemon: [OK]

Shutting down NFS quotas: [OK]

Shutting down NFS services: [OK]

Staring NFS serviecs: [OK]

Staring NFS quotas: [OK]

Staring NFS daemon: [OK]

Staring NFS mountd: [OK]

5. Use the mount command to mount the shared directory on the NFS server.

 Command: # mount-t nfs 192.168.5.160:/home/mnt

The IP address of my VM is 192.168.5.160.

The mounted local/mnt directory is the same as the local/home directory.

/Home/smb is mounted to the/mnt directory.

You can mount yourself to demonstrate the preceding settings.

Note: NFS servers are generally used for mounting between two different Linux Hosts.

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.