Linux / 各種サーバー / apache karafの設定


Linux / 各種サーバー / apache karafの設定

目次

概要

apache karafの設定

インストール

ダウンロード

http://karaf.apache.org/index/community/download.html
  • apache-karaf-2.3.5.tar.gzを選択する。
  • Windows版とLinux版ではモジュールが異なるので注意する。

インストール

mkdir /usr/local/apache
cp -p /tmp/apache-karaf-2.3.5.tar.gz ./
tar xvzf apache-karaf-2.3.5.tar.gz
chown -R root:root ./apache-karaf-2.3.5
  • インストールパスは一例です。

起動テスト

  • 起動
    export JAVA_HOME=/usr/java/jdk1.7.0_55
    cd /usr/local/apache/apache-karaf-2.3.5
    ./bin/karaf
  • 起動画面
            __ __                  ____
           / //_/____ __________ _/ __/
          / ,<  / __ `/ ___/ __ `/ /_
         / /| |/ /_/ / /  / /_/ / __/
        /_/ |_|\__,_/_/   \__,_/_/
    
      Apache Karaf (2.3.5)
    
    Hit '<tab>' for a list of available commands
    and '[cmd] --help' for help on a specific command.
    Hit '<ctrl-d>' or type 'osgi:shutdown' or 'logout' to shutdown Karaf.

各種設定

featureの追加インストール

http

  • インストール
    features:install http

webconsole

  • インストール
    features:install webconsole
  • 管理画面
    http://ホスト名:8181/system/console
  • 設定ファイル
    ${KARAF_HOME}/etc/jetty.xml

activemq

要確認

  • インストール
    features:addUrl mvn:org.apache.activemq/activemq-karaf/5.9.1/xml/features
    osgi:install -s mvn:org.apache.activemq/activemq-camel/5.8.0
    features:install activemq-client

コマンド

osgi

  • インストールされているバンドルをリスト表示する。
    osgi:list
    osgi:list -t 10
    • "-t"オプションでスタートレベルが指定可能。

features

  • featureをインストールする。
    features:install feature
  • featureの情報を表示する。
    features:info feature
    • 依存関係や設定ファイル名等が表示される。