|
Configure linux nfs server step by step guide example and implementation |
| Home | Peer to Peer | CompTIA N+ | CCNA | MCSE | MCITP | RHCE | Interview | Tips n Tricks |
How to configure linux nfs server step by step guide Example and ImplementationNFS, or Network File System, is a server-client protocol for sharing files between computers on a common network. NFS enables you to mount a file system on a remote computer as if it were local to your own system. You can then directly access any of the files on that remote file system. The server and client do not have to use the same operating system. The client system just needs to be running an NFS client compatible with the NFS server. For example NFS server could be a Linux system and Unix could be a client. But it can’t be a window system because window is not NFS compatible. The NFS server exports one or more directories to the client systems, and the client systems mount one or more of the shared directories to local directories called mount points. After the share is mounted, all I/O operations are written back to the server, and all clients notice the change as if it occurred on the local filesystem. A manual refresh is not needed because the client accesses the remote filesystem as if it were local.because access is granted by IP address, a username and password are not required. However, there are security risks to consider because the NFS server knows nothing about the users on the client system. Exam question 1 Some users home directory is shared from your system. Using showmount -e localhost command, the shared directory is not shown. Make access the shared users home directory Exam question 2 The System you are using is for NFS (Network File Services). Some important data are shared from your system. Make automatically start the nfs and portmap services at boot time Exam question 3 Share /data directory using NFS only to 192.168.0.0/24 members. These hosts should get read and write access on shared directory. Configure nfs serverIn this example we will configure a nfs server and will mount shared directory from client side. For this example we are using two systems one linux server one linux clients . To complete these per quest of nfs server Follow this link
We have configured all these steps in our pervious article. necessary configuration for nfs server We suggest you to review that article before start configuration of nfs server. Once you have completed the necessary steps follow this guide.
Three rpm are required to configure nfs server. nfs, portmap, xinetd check them if not found then install
Now check nfs, portmap, xinetd service in system service it should be on #setup Select System service from list [*]portmap [*]xinetd [*]nfs
Now restart xinetd and portmap service
now create a /data directory and grant full permission to it
now open /etc/exports file
now restart the nfs service and also on it with chkconfig
verify with showmount command that you have successfully shared data folder configure client system
ping form nfs server and check the share folder
now mount this share folder on mnt mount point.
To test this share folder change directory to mnt and create a test file
After use you should always unmount from mnt mount point In this way you can use shared folder. But this share folder will be available till system is up. It will not be available after reboot. To keep it available after reboot make its entry in fstab
create a mount point, by making a directory
now open /etc/fstab file
save the with :wq and exit reboot the system with reboot -f command #reboot -f
after reboot check /temp directory it should show all the shared data |
|||||
|
|
|
|