CentOS 6.5 NFS Installation configuration

Source: Internet
Author: User
Tags anonymous

First, the environment introduction:

Server: CentOS 192.168.1.225

Client: CentOS 192.168.1.226

Second, installation:

Installation Configuration for NFS:


CentOS 5:

1 Yum-y Install Nfs-utils Portmap

CentOS 6 (in CentOS 6.5, Portmap service is responsible for Rpcbind):

1 Yum-y Install Nfs-utils Rpcbind

third, server-side configuration:

1. Create a shared directory:

1 [Root@centos2/] # Mkdir/usr/local/test

2, NFS File configuration:

1 2 3 [Root@centos2/] # Vi/etc/exports #增加一行:/usr/local/test/192.168.1.226 (Rw,no_root_squash,no_all_squash, Sync)

Save exit;

Make configuration effective:

1 [Root@centos2/] # Exportfs-r

Note: Configuration file Description:

/usr/local/test/is a shared directory, using an absolute path.

192.168.1.226 (Rw,no_root_squash,no_all_squash,sync) for the client's address and permissions, the address can be a network segment, an IP address or a domain name, the domain name support wildcard characters, such as: *. Youxia.com, there is no space between the address and the permission, the permission description:

Rw:read-write, can read and write;

Ro:read-only, read only;

Sync: Files are written to both hard disk and memory;

Async: Files are temporarily stored in memory, rather than written directly to memory;

When No_root_squash:nfs client connects to the server, if root is used, then the directory shared by the server also has root privileges. Obviously it's not safe to open this.

When Root_squash:nfs client connects to the server, if root is used, then the directory shared by the server has anonymous user rights, usually he will use nobody or nfsnobody identity;

All_squash: No matter what user the NFS client connects to the server, it has anonymous user rights to the directory shared by the server;

Anonuid: The UID value of an anonymous user, usually a nobody or nfsnobody, where you can set it yourself;

Anongid: The GID value of the anonymous user.

3, Start:

CENTOS6:

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.