[Mono-list] mono service/SCM on linux how to
andreas.faerber at web.de
Mon May 1 16:32:07 EDT 2006
> I have been trawling the list archives and the mono site on the
> recommended approach for writing / deploying a windows service to
> target linux but haven't been able to find a good reference.
The "good reference" depends pretty much on the Linux distribution you
are targetting. Most documentation and links in the list archive are
about Novell's SuSE Linux; I managed to get it working on Fedora Core
(and Solaris) based on that, using documentation for native
> What is the current recommended approach for developing and deploying
> services with mono on linux?
> Basically I am looking to port a windows service so that it runs via
> /etc/init.d/natesnuclearservice start | stop | restart etc.
Usually this involves having a distribution-specific shell script that
spawns mono-service (or mono-service2 for .NET 2.0) and interacts with
it via PID and signals.
During initial development getting your service to work can be a little
tricky as exceptions or Mono crashes are not logged. You might need to
figure out how to manually call Mono with the managed mono-service class
to see its output on the console.
As for deployment, that depends on the system as well - so far I've only
worked with Solaris packages but it should also be possible through RPMs
or Debian packages just like installing native daemons.
> I saw a few threads refer to a mono-service but they seemed a couple
> years old?
The most up-to-date mono-service options are available through "man
And no, there are also more recent posts on this topic, e.g. by me
around February, also some earlier related posts on the topic of running
XSP as daemon.
More information about the Mono-list