Share files in NFS mode between Linux-Linux Enterprise Application-Linux server application information. For details, refer to the following section. There are many ways to share files between Linux servers (ftp, smba, and nfs). Here we will introduce the following: how to share and implement nfs files in Linux.
1. You must first enable the portmap and nfs services.
Service portmap start
Service nfs start
2. Check whether the service is enabled.
Netstat-ntpl
3. Modify/etc/exports
Vi/etc/exports
#/Home/temp * (rw, sync, no_root_squash, all_squash)
/Home/temp * (ro, sync, no_root_squash, all_squash) (/home/temp indicates the directory to be shared)
/Mnt/inst * (ro, sync) (* indicates any address)
4. exportfs-a (shared directories everywhere)
5. showmount-e 127.0.0.1 (view the shared directory)
Export list for 127.0.0.1:
/Mnt/inst *
/Home/temp *
6. Enter the required shared file on the client.
Mount-t nfs 192.168.111.1:/mnt/inst/mnt (mount the shared directory on the server)
7. Run the mount command on the client to view the mounted file.
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