NFS (Network File System) server configuration function: folder sharing is developed by sun. 1. check whether the NFS server is installed. RedHatEnterpriseLinux5 is installed by default. how can this problem be checked, run the following command: Rpm & amp; ndash; qa | grepn...
NFS (Network File System) server configuration
Purpose: share folders. it is developed by sun.
1: Check whether the NFS server is installed. The Red Hat Enterprise Linux5 system is installed by default. how can I check it and execute the following command:
Rpm-qa | grep nfs
Rpm-qa | grep portmap
If the installation is successful, the following information is displayed:
[Root @ localhost60 ~] # Rpm-qa | grep nfs
Nfs-utils-1.0.9-40.el5
Nfs-utils-lib-1.0.8-7.2.z2
[Root @ localhost60 ~] # Rpm-qa | grep portmap
Portmap-4.0-65.2.2.1
2: If the NFS server is not installed, configure it.
File format for creating an exports file
Manually create
Vim/etc/exports
/Nishome 192.168.100.0/255.255.255.0 (rw, sync) this is on my computer
# Share a directory the CIDR block you share with or the permissions of a host
3: start or restart NFS
Start Service nfs start
Service nfs restart
Service nfs stop
4: run rpcinfo-p | grep nfs to check whether nfs is started and whether its processes are running.
If it is started, you will see
100003 2 udp 2049 nfs
100003 3 udp 2049 nfs
100003 4 udp 2049 nfs
100003 2 tcp 2049 nfs
100003 3 tcp 2049 nfs
100003 4 tcp 2049 nfs
5. check the NFS server sharing information on the client.
View NFS server information
Showmount-e 192.168.100.60 (NFS server address)
[Root @ localhost60 ~] # Showmount-e 192.168.100.60
Export list for 192.168.100.60:
/Nishome 192.168.100.0/255.255.255.0 (this is local)
6: The client loads the NFS shared directory.
Create a Mount Directory
Mkdir/mnt/nfs
Mount
Mount-t nfs 192.168.100.60:/exports/rhel/mnt/nfs
You can use umount/mnt/cdrom to uninstall it.
7: how to automatically load data when the system starts
Edit/etc/fstab first
Vim/etc/fstab
Add
192.168.100.60:/exports/rhel/mnt/nfs defaults 0 0
Then run mount-a to reload the fstab file to make it take effect.
Author: "Fools note"