Sunday, June 29, 2008

Solaris: Setting up a NFS server

This assumes you've already setup the OpenSSH server on the machine.

First, you will need these packages installed in this order:

SUNWgssk
SUNWrsgk
SUNWnfscr
SUNWnfsckr
SUNWnfscu
SUNWnfssr
SUNWnfsskr
SUNWnfssu

Now, you must define your exports before nfsd will start. You do this by altering /etc/dfs/dfstab. To share /export/install for instance, where I have the Solaris installer files, I would add this line:

share -F nfs -o ro /export/install

This line gives everyone read-only access to my install files.

Now, nfs can be started and made to start at boot with these commands:

svcadm enable -t nfs/server
svcadm enable nfs/server

You can check to see if everything is working with a showmount -e.

Solaris: Installing SSHD

This assumes the Reduced Network Support software group was chosen during initial installation.

These packages will need to be installed in this order:

SUNWgssc
SUNWgss
SUNWsshcu
SUNWsshdr
SUNWsshdu

After these are installed, you will have to generate host keys for sshd. You do this with the following command:

/lib/svc/method/sshd -c

Now that the keys exist sshd can be started with this command:

svcadm enable -t ssh

And made to start at boot with this command:

svcadm enable ssh