Article Title: simple process of creating an NFS file 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.
The simplest one is:
1. Two computers with rh9 installed, 192.168.10.1 and 192.168.10.2, with 10.1 As the nfs server and 10.2 as the client. The two machines can ping each other.
2. Start the service on two computers respectively (of course, install the nfs Software Package)
# Service nfs start and # service portmap start
3. Create a directory named 10.1 under/root on machine 999, create a 999.txt file under/root/999, and change the directory permissions of/999, I set # chmod 777 999
Run the # exportfs-rv command to view the directory that has been exports.
4. operations on the machine 10.2:
First # showmount-e 192.168.10.1 check whether the directory shared by the machine 10.1 can be found. Then, create a directory named 10.2 under the/root directory 888.
5. Mount the 10.2 directory on the machine 10.1:
# Mount-t nfs 192.168.10.1:/root/999/root/888
6. If you can mount the file correctly, you can see the 999.txt file under/root/10.2 of the machine 888.
Note: It is normal when I operate on a VM to step 3, but it will not work until step 3.