In many systems, NFS services are disabled. Therefore, we need to manually enable and configure them. 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:
- # /etc/rc3.d/S15nfs.server start
Share directory:
Edit the/etc/dfs/dfstab file:
- 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"
- # dfshares
-
- RESOURCE SERVER ACCESS TRANSPORT
-
- solaris:/home solaris - -
Ii. NIS settings:
Copy the configuration file:
- # cp /etc/nsswitch.nis /etc/nsswitch.conf
Set Domain Name:
- # domainname congli
-
- # echo congli > /etc/defaultdomain
Initialize and start the service:
- # ypinit -m
-
- # /usr/lib/netsvc/yp/ypstart
Client (Solaris 9)
I. NFS Client settings:
Start the NFS Client service:
- # /etc/rc2.d/S73nfs.client start
Edit/etc/vfstab:
- 10.0.0.12:/home - /home nfs - yes soft,bg
Mount the NFS file system:
- # mountall -r
Ii. NIS settings:
Copy the configuration file:
- # cp /etc/nsswitch.nis /etc/nsswitch.conf
Set Domain Name:
- # domainname congli
-
- # 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:
- # Ypinit-m (fill in the hostname of the NIS server, Ctrl + D)
-
- #/Usr/lib/netsvc/yp/ypstart