Managing network services under Solaris 10 is a bit different to what it used to be with older Solaris releases. As an example I will show how to set up a Trivial FTP server.
The tftp service software ships with Solaris, but is not configured by default. In my work I need a tftp server quite often, for example it is used to update flash firmware on the system controllers on some of Sun's server systems.
With Solaris 10 you need to define a “SMF service manifest” ... something which can be as complex or as simple as you want it to be. You will find a commented entry for a tftp service in the /etc/inetd.conf file, but simply un-commenting and sig-HUPing inetd it is not enough to start the service. You need to manage the service through the SMF tools.
Solaris 10 ships with a very handy tool to convert inetd.conf entries to SMF service manifests, in the form of the inetconv command.
Make a copy of the /etc/inetd.conf file, eg in /tmp and edit it to un-comment the tftp service entry. You can do some basic customizing, eg to the startup options for the service program, eg if you want to use a non-default directory for the service, change the definition on the line to reflect this. If there are any other service entries in this file you should remove them before continuing, leaving only the entry for the service that you are busy configuring. In the below example I set /export to be the tftp base directory:
tftp dgram udp6 wait root /usr/sbin/in.tftpd in.tftpd -s /export |
Then run inetconv, specifying the modified file you created, like this
Bash-3.2# inetconv -i /tmp/myservice_inetd.conf |
The new service will be created as follow:
tftp -> /var/svc/manifest/network/tftp-udp6.xml Importing tftp-udp6.xml ...Done |
You can now check the service and start or stop it with the normal svc commands, like this:
bash-3.2$ svcs tftp/udp6 STATE STIME FMRI online 10:30:05 svc:/network/tftp/udp6:default |
1 comment:
Thanks for the help! I want to use this for remote booting my HTPC's on my network out of my speedy ZFS pool.
Post a Comment