Article Title: NFS server in Linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
NFS is a Network File System (NetworkFileSystem) and a network protocol for file sharing between hosts.
Assume that the server ip address is 10.10.10.10 and the client ip address is 10.10.10.11.
1. Configure an instance on the NFS server
# Vi/etc/exports
/Opt/test/10.10.10.10 (async, rw, no_root_squash)
Save and exit wa.
Restart the service:
# Exportfs-rav
# Service portmap restart
# Service nfslock restart
# Service nfs restart
2. Configure an instance on the NFS client
# Vi/etc/fstab
10.10.10.10:/opt/test/home/test nfs rsize = 8192, wsize = 8192, retrans = 5, retry = 1, intr 0 0
// Mount the content in the/opt/test directory on the server to the/home/test directory on the client!
# Umount-a // cancel all mounting
# Mount-a // mount all
# Mount/home/test // mount only the command/opt/test
# Umount/home/test // cancel mounting/home/test
# Df // view the partition status and mount information of the current linux System
3. Mount the windows 2003 shared directory to linux:
Assume that the ip address of the win2003 server is 10.10.10.12.
# Mount-t cifs // 10.10.10.12/test/home/test-o username = administrator
Password:
// Mount files in the shared directory test (shared folder name) of win2003 to/home/test in linux.
// My redhat linux.
Write these for now ~~ These steps are the most commonly used NFS service!