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
本文版權歸做者和博客園共有,歡迎轉載,但未經做者贊成必須保留此段聲明,且在文章頁面明顯位置給出原文鏈接,不然保留追究法律責任的權利。html

相關文章
相關標籤/搜索