我正在寻找一个可以执行的unix脚本或命令,它会告诉我ServiceMix是否正在运行,类似于bin / activemq状态。有没有办法在ServiceMix中开箱即用?
非常感谢任何帮助。
我正在使用servicemix版本4.5.2
答案 0 :(得分:1)
根据您使用的版本,可以使用 status shell脚本 它会告诉你它是正在运行还是没有运行......
答案 1 :(得分:0)
创建servicemix服务的过程
karaf@root> features:install wrapper
wrapper:install -s AUTO_START -n KARAF -d Karaf -D "Karaf Service"
在Redhat / Fedora / CentOS系统上: 要安装服务:
$ ln -s /home/onofreje/apache-karaf-2.1.3/bin/KARAF-service /etc/init.d/
$ chkconfig KARAF-service --add
要在重新启动机器时启动服务:
$ chkconfig KARAF-service on
要在重新启动计算机时禁用启动服务: $ chkconfig KARAF-service off
启动服务:
$ service KARAF-service start
停止服务:
$ service KARAF-service stop
要卸载服务:
$ chkconfig KARAF-service --del
$ rm /etc/init.d/KARAF-service
在Ubuntu / Debian系统上: 要安装服务:
$ ln -s /home/onofreje/apache-karaf-2.1.3/bin/KARAF-service /etc/init.d/
要在重新启动机器时启动服务:
$ update-rc.d KARAF-service defaults
要在重新启动计算机时禁用启动服务:
$ update-rc.d -f KARAF-service remove
启动服务:
$ /etc/init.d/KARAF-service start
停止服务:
$ /etc/init.d/KARAF-service stop
要卸载服务:
$ rm /etc/init.d/KARAF-service
要检查CentOS service KARAF-service status
中的状态,它会告诉您服务的状态。