OSGI-karaf安装及使用
来源:互联网 发布:2016淘宝类目销量排名 编辑:程序博客网 时间:2024/06/05 10:34
____________________________________________________________
karaf是OSGI的容器实例,类似tomcat是servlet的容器实例一样
官网:http://karaf.apache.org
1,下载源文件
在http://karaf.apache.org/index/community/download.html
下载apache-karaf-2.3.0.zip, apache-karaf-2.3.0-src.zip
2,解压
解压apache-karaf-2.3.0.zip,比如到E:\workspace\apache-karaf-2.3.0
解压apache-karaf-2.3.0-src.zip并把src目录移动到E:\workspace\apache-karaf-2.3.0
目录结构为:
/bin: startup scripts
/data: working directory
/demos:
/deploy: hot deploy directory
/etc: configuration files
/lib: contains the bootstrap libraries
/src: unzip from apache-karaf-2.3.0-src.zip
/system: OSGi bundles repository, laid out as a Maven 2 repository
/instances: directory containing child instances //mvn 成功后,会创建此目录
/cache: OSGi framework bundle cache
/generated-bundles: temporary folder used by the deployer
/log: log files
/deploy: hot deploy directory
/instances: directory containing child instances
/lib: contains the bootstrap libraries
/lib/ext: directory for JRE extensions
/lib/endorsed: directory for endorsed libraries
/system: OSGi bundles repository, laid out as a Maven 2 repository
3,执行mvn命令
E:\workspace\apache-karaf-2.3.0\src>mvn clean install -DskipTests=true
出现karaf@root时就证明成功了,如果卡死,可以任务管理器关掉2个java.exe
4,启动karaf
然后进入E:\workspace\apache-karaf-2.3.0\bin>karaf//会启动2个java.exe
验证:下面是成功的输出
karaf@root> admin:list
SSH Port RMI Ports State Pid Name
[ 8101] [1099/44444 ] [Started ] [ 2704] root
5, Managing child instances
admin:create alpha//创建子实例
会建立apache-karaf-2.3.0\instances\alpha目录,并有子目录:bin,data,deploy,etc,system
admin:list//LISTING ALL container instances
//连接child instance, 需要再打开一个cmd,启动子实例
admin:connect [-u username] [-p password] instance //CONNECTING TO A CHILD INSTANCE
logout//退出连接
admin:stop instance
admin:destroy instance
6, 关闭Karaf : osgi:shutdown.
更多命令可以用帮助命令,--help,或者cmd提示。
- OSGI-karaf安装及使用
- Karaf--OSGi
- maven,OSGI,karaf 学习笔记
- Karaf教程第3部分 使用OSGi Metatype服务和Felix Webconsole改善配置编辑
- osgi+camel+karaf运行环境搭建(1)
- osgi+camel+karaf运行环境搭建(2)
- osgi + camel + karaf配置日志输出
- Karaf教程第8部分-分布式OSGi
- karaf使用指令
- Karaf OSGi && JavaEE 通俗易懂版 实战教程入门(一)
- Karaf OSGi && JavaEE 通俗易懂版 实战教程入门(二)
- Karaf OSGi && JavaEE 通俗易懂版 实战教程入门(三)
- Karaf OSGi && JavaEE 通俗易懂版 实战教程入门(四)
- Karaf OSGi && JavaEE 通俗易懂版 实战教程入门(五)
- Karaf教程第4部分 OSGi中的CXF服务
- Karaf 实践指南 Kafka 安装 Karaf 学习 Kafka 帮助
- osgi实战学习之路:2. maven+maven-bundle-plugin+karaf搭建osgi之HelloWorld
- Apache Karaf安装带classifier的bundle
- gitbook常用命令
- 如何应对面试官的闲扯
- hdu1556Color the ball线段树区间更新
- 万恶的NULL
- @Transactional 事务回滚 分析
- OSGI-karaf安装及使用
- sql-语法
- java urlrewrite
- Spring AOP annotation 简单实例
- sql-概述
- 声明和定义的区别
- sql-经典例子练习
- Spring AOP annotation 用环绕通知写日志
- AngularJs中$http发送post或者get请求,SpringMVC后台接收不到参数值的解决办法