NFS Server and NFS Client settings

Source: Internet
Author: User

In some systems, the NFS service is disabled. To enable this function, we need to set it manually. The settings of NFS Server and NFS Client are described in detail in this article. We hope that you will be able to master this part of knowledge.

Server (Solaris 9 ):

I. NFS Server settings:

Start the NFS Server service:

 
 
  1. # /etc/rc3.d/S15nfs.server start 

Share directory:

Edit the/etc/dfs/dfstab file:

 
 
  1. share -F nfs -o rw=10.0.0.13,root=10.0.0.13 /home 

Run "share all" to share the directory, or do not edit the file. directly input the file in the command line with the same effect.

Check whether share is successful"

 
 
  1. # dfshares  
  2.  
  3. RESOURCE                                  SERVER ACCESS    TRANSPORT  
  4.  
  5. solaris:/home                         solaris  -         - 

Ii. NIS settings:

Copy the configuration file:

 
 
  1. # cp /etc/nsswitch.nis /etc/nsswitch.conf 

Set Domain Name:

 
 
  1. # domainname congli  
  2.  
  3. # echo congli > /etc/defaultdomain 

Initialize and start the service:

 
 
  1. # ypinit -m  
  2.  
  3. # /usr/lib/netsvc/yp/ypstart 

Client (Solaris 9)

I. NFS Client settings:

Start the NFS Client service:

 
 
  1. # /etc/rc2.d/S73nfs.client start 

Edit/etc/vfstab:

 
 
  1. 10.0.0.12:/home - /home nfs - yes soft,bg 

Mount the NFS file system:

 
 
  1. # mountall -r 

Ii. NIS settings:

Copy the configuration file:

 
 
  1. # cp /etc/nsswitch.nis /etc/nsswitch.conf 

Set Domain Name:

 
 
  1. # domainname congli  
  2.  
  3. # echo congli > /etc/defaultdomain 

Add the IP address of the NIS server to/etc/hosts:

10.0.0.12 solaris

Initialize and start the service:

 
 
  1. # Ypinit-m (fill in the hostname of the NIS server, Ctrl + D)
  2.  
  3. #/Usr/lib/netsvc/yp/ypstart

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.