hans.hu

夫天地者,万物之逆旅也;光阴者,百代之过客也。而浮生若梦,为欢几何?古人秉烛夜游,良有以也。况阳春召我以烟景,大块假我以文章。

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):
  1. First you need to install the Service Wrapper feature: features:install wrapper
  2. Once installed, wrapper feature will provide wrapper:install new command in the Karaf shell, you can get help from wrapper:install --help
  3. 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
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。

posted on 2014-12-10 16:21  hans.hu  阅读(281)  评论(0编辑  收藏  举报

导航