NFS server configuration

Source: Internet
Author: User
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"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.