1. first check whether the nfs-utils installation package is installed, command: # rpm-qnfs-utils display nfs-utils-1.0.9-24.el5 is already installed 2. if the nfs-utils installation package is not installed, find and install the nfs-utils installation package from the installation disc of the corresponding Linux operating system. Command: # rpm-ivhnf
1. Check whether the nfs-utils installation package is installed,
Command: # rpm-q nfs-utils
Show nfs-utils-1.0.9-24.el5 as installed
2. If the nfs-utils installation package is not installed, find and install the nfs-utils installation package from the installation disc of the corresponding Linux operating system version.
Command: # rpm-ivh nfs-utils-1.0.9-24.el5.i386.rpm
3. Configure NFS and add the directories and access permissions that are allowed to be accessed and accessed by computers.
Command: # vi/etc/exports
Add the following Under vi:/Home 192.168.5. * (rw, sync, no_root_squash)
/Home: directory that allows access by other computers
192.168.5. *:Client IP Address
Rw: read/write
Sync: Synchronous write disk (async: data will be saved in the memory first, rather than directly written to the hard disk)
No_root_squash: indicates that the root user of the client has the write permission on the directory.
4. Start the NFS server
Command: #/etc/init. d/nfs restart
Shown below as successful
Shutting down NFS mountd: [OK]
Shutting down NFS daemon: [OK]
Shutting down NFS quotas: [OK]
Shutting down NFS services: [OK]
Staring NFS serviecs: [OK]
Staring NFS quotas: [OK]
Staring NFS daemon: [OK]
Staring NFS mountd: [OK]
5. Use the mount command to mount the shared directory on the NFS server.
Command: # mount-t nfs 192.168.5.160:/home/mnt
The IP address of my VM is 192.168.5.160.
The mounted local/mnt directory is the same as the local/home directory.
/Home/smb is mounted to the/mnt directory.
You can mount yourself to demonstrate the preceding settings.
Note: NFS servers are generally used for mounting between two different Linux Hosts.