Mac uses NFS to connect to the shared folder on centos

Source: Internet
Author: User
Introduction to using NFS to connect shared folders on centos for Mac

Network File System (NFS), a protocol used for distributed file systems, was developed by shengyang and published on September 10, 1984. The function is to allow different machines and operating systems to share individual data with each other through the network, so that applications can access data on server disks through the network on the client, it is a way to share disk files between UNIX systems.

The basic principle of NFS is "allow different clients and servers to share the same file system through a group of RPC", which is independent of the operating system, allows different hardware and operating system systems to share files.

NFS provides the following services:

  • Search for files in the directory
  • List files in a directory
  • Manage directories
  • Get the attributes of each file)
  • File read/write

Wikipedia-Network File System

Centos Configuration

Use

rpm -qa|grep nfsrpm -qa|grep portmap

Two commands are used to check whether NFS is installed.

If the result is

[root@localhost ~]# rpm -qa|grep nfsnfs-utils-lib-1.0.8-7.2.z2nfs-utils-1.0.9-40.el5system-config-nfs-1.3.23-1.el5[root@localhost ~]# rpm -qa|grep portmapportmap-4.0-65.2.2.1

Two software packages nfs-utils Portmap are installed. If not, manually install

Configure/etc/exportsFile:

/var/www 192.168.100.222(rw)

Format description:

[Directory to be shared] [IP address shared to client (option)] [client 2...

For detailed instructions on the configuration file, see: here

If centos prompts

nfsd: request from insecure port (192.168.7.130:49232)!

Configure the 'options'(rw,async,insecure)You can.

Start (or restart) the NFS server (first Portmap and then NFS. Stop NFS when stopped. Portmap may be required by other services)

service portmap start(restart)service nfs start(restart)

Set the two services to start automatically when they are started.

chkconfig --level 35 portmap onchkconfig --level 35 nfs on

Change the permission of the folder to be shared as needed

chmod -R 777 /var/www
Mac Configuration

Use in a terminal

showmount -e IP\Domain

To view the sharing status of the centos host.

Run the command to mount the file.

$ sudo mount -t nfs 192.168.100.222:/var/www /private/nfs

 

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.