Summary of Linux NFS settings

Source: Internet
Author: User

In Linux, we can also use the NFS service. So today we will explain the relevant content in this regard. Now let's take a closer look at the Linux NFS settings. NFS was initially developed by Sun Microsytem in 1984. Its primary function is to allow UNIX computers on the network to share directories and files. we can mount the file system shared by the remote end to the local end, and then we can easily use the remote end file, the operations are just like local operations, so they won't feel any different. NFS also has many advantages, such as centralized file management and disk space saving ...... and so on.

Install Linux NFS:

Most Linux Distribution will install NFS. In OpenLinux, NFS is composed of two RPM suites: NFS and nfs-server, nfs mainly includes some programs required by the client, while nfs-server is mainly a daemon program of NFSServer.

Set Linux NFS:

Configuration File:/etc/exports

File Format: File System [host] [Option]

Example:

/Charlie (ro) john (rw, no_root_squash)

/Tmp pc * .col.com.tw (rw) 172.29.0.0/255.255.255.0.0 (ro)

/Pub (ro)

/Pub/private (noaccess)

Option description:

Ro read only

Rw read write

No_root_squash: trust the client, corresponding to UID

Noaccess client is not available

Start and end the Linux NFS service:

After changing the configuration file, remember to restart the NFS service. The Start and Stop methods are as follows:

#/Etc/rc. d/init. d/nfs [start | stop | restart | reload]

Start NFS service

Stop NFS service

Restart stop and restart NFS service

Reload the NFS Setting Value

The client uses NFS:

1. View NFS services:

The client can use the showmount command to check which NFS services are provided by the Server.

# Showmount-e to see which directories are shared

# Showmount-a: All the mount entries are displayed.

2. Connect to the Linux NFS Server:

To use resources on NFSserver, use the mount command.

# Mount-tNFShostname:/shared_dir

Example:

# Mount-tNFS192.168.1.100:/tmp/mnt/nfs

3. automatically connect to NFS upon startup:

If you want to automatically mount NSF when starting the system, you need to edit the/etc/fstab file.

Example:

192.168.1.100:/tmp/mnt/nfsNFSdefaults 0 0

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.