首页 > 代码库 > ServiceMix in daemon mode
ServiceMix in daemon mode
For development simplicity, we can start Karaf in daemon mode by executing ‘bin\admin.bat start root‘, here root is the default instance.
In production environment, we need to integrate Karaf directly into your operating system service control (http://karaf.apache.org/manual/latest/users-guide/wrapper.html):
- First you need to install the Service Wrapper feature: features:install wrapper
- Once installed, wrapper feature will provide wrapper:install new command in the Karaf shell, you can get help from wrapper:install --help
- Then you can follow the generated messages from wrapper:install to install the service
Finally while ServiceMix is started, you just connect to Karaf to check whether these services are available. Luckily Karaf offers 2 ways for doing so: a remote Shell accessible through an SSH connection, and a JMX interface.
Thus we can use the SSH connection now. The port used by Karaf to host the SSH server is configured in a file called ‘org.apache.karaf.shell.cfg‘ located in the ‘etc‘ folder in the Karaf installation. When Karaf is running, it also starts an SSH server, and a JMX server. So we can connect to Karaf through SSH by executing ‘bin\client.bat -a 8101 -h 159.99.203.109 -u karaf‘. Here default user/password is karaf/karaf, and you can get help from ‘client.bat –help‘.
Note: you can also use putty or kitty SSH client.
作者:Hans.Hu
出处:http://huyh.cnblogs.com
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。
ServiceMix in daemon mode