SMF

Solaris 10 is definitely getting there, had to play around with smf a little to understand it, reminds me of a smarter version of ”’service”’ under redhat linux.

So, here’s some XML and method files to start tomcat and apache (with apache only starting if tomcat is running):-

Following XML manifest files should be dropped into /var/svc/manifest/site/, the method files should be dropped into /lib/svc/method/.

* Apache 2 – Manifest
* Tomcat – Manifest
* Apache 2 – Method
* Tomcat – Method

They define the location of the method files (basically old RC style scripts) plus any dependancies. Once written, the XML files need to be validated and then imported to
the SMF system:


# cd /var/svc/manifest
# svccfg -v validate network/apache2.xml
# svccfg -v import network/apache2.xml
# svccfg -v validate site/tomcat.xml
# svccfg -v import site/tomcat.xml

Then, we set them to enabled using ‘svcadm’:

# svcadm enable tomcat
# svcadm enable apache2

O’Reilly have a nice long tutorial on how the manifest files work etc.

No comments yet.
No trackbacks yet.