NFS service configuration
Zhang junhao, Haidian District, Beijing
I. NFS: Network File System (NFS), a protocol used for distributed file systems, 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.
Ii. NFS service configuration process
1. Download the NFS server
Sudo apt-Get install nfs-kernel-Server
2. modify the configuration file of the NFS server and create a shared folder for the NFS server in the root directory.
Sudo VI/etc/exports
3. Create an NFS server folder in the root directory
CD/
Sudo mkdir/source/rootfs-P
4. Modify the permission of the shared folder so that everyone can access it.
CD/
Sudo chmod 777 Data Source
Sudo chmod 777 rootfs
5. Restart the NFS service.
Sudo/etc/init. d/nfs-kernel-server restart7 create a mount point on the client
Sudo mkdir/mnt/nfsroot
8. Mount the shared folder of the NFS server to the local mount point of the client.
Sudo Mount 192.168.0.196:/source/rootfs/mnt/nfsroot
9 check the client's file folder. You can see the file and
If the content of the/source/rootfs file is the same, the mounting is successful.
CD/mnt/nfsroot
10. Detach a mount point
Sudo umount/mnt/nfsroot
NFS service configuration