NFS Network File system installation configuration Mount Uninstall tutorial

Source: Internet
Author: User
Tags mkdir

0X00 NFS Profile

The full name of NFS is Net-file-system, which is the network file system. Unlike Samba and FTP, the primary purpose of FTP is to upload and download files, and Samba's main function is to share files, while NFS's main function is to use it as a file system. That is, NTFS, FAT32, EXT4, and so on are similar in nature. We can mount this NFS as a disk partition on its own operating system, like operating its own partition, and even boot the OS from NFS.
Experimental environment: two virtual machines centos7.x
In an intranet environment

0X01 install NFS software and services

# Install software
Yum Install Rpcbind
Yum Install Nfs-utils
0X02 Create test directory and Modify permissions

# Create a Test directory
Mkdir/home/share
# Create a test file (let the contents of the file, make it easier to judge if the building is successful later)
LS/>/home/share/test1
ls/etc/>/home/share/test2
# Create mount point and then Mount NFS here
Mkdir/home/test
# Set this test directory to 777 permissions
chmod 777/home/share
0x03 Modify configuration file

The profile is/etc/exports using a text editor to open the configuration file and modify it
# Add the following configuration 192.168.123.132 is the client IP
/home/share/192.168.123.132 (rw, Sync) * (RO)
/home/share/represents the path of NFS
192.168.123.132 (rw, sync) indicates that 192.168.123.132 accesses this NFS using a later configuration, RW permissions (read-write), Sync sync mode, which indicates that data in memory is written to disk in real time
* (RO) means that all IP access using the following configuration, RO means read only reading
Multiple access items can be accessed below each path, namely 192.168.123.132 (rw, Sync) or * (RO), separated by spaces

0X04 Start the service and check for NFS configuration

# Start Service
Systemctl Start Portmap
Systemctl Start NFS
# at the client check 192.168.123.123 is the service side
SHOWMOUNT-E 192.168.123.123
# If the output goes as follows, that's right.
Export List for 192.168.123.123:
/home/share *
0x05 Mount and Uninstall

# mount
Mount-t NFS 192.168.123.123:/home/home/test
# Uninstall
Umount/home/test

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.