To share a directory in Solaris 10 via NFS, follow the step below
Lets check whether the NFS server service is active
# svcs network/nfs/server
STATE STIME FMRI
disabled 3:28:52 svc:/network/nfs/server:default
It is disabled, lets enable it
# /usr/sbin/svcadm enable -r network/nfs/server
# /usr/sbin/svcadm enable -s network/nfs/server
# /usr/sbin/svcadm restart /network/nfs/server
Now we confirm again
# svcs /network/nfs/server
STATE STIME FMRI
online 3:30:19 svc:/network/nfs/server:default
Now use the following command to share the folder
# share -F nfs /apps/files
#shareall -F nfs
Here /apps/files represents the folder which I shared
If you want to share to the files to particular user or group, use the following command
# share -F nfs -o rw=oracle -d “Type your description here” /apps/files
Here oracle represent an example username
To verify whether the folders are shared, use the following command
#share
– /apps/files rw “”
Now you have shared the files via NFS