1.Download Opennms latest source code



2.Download latest Java JDK and install it. Set JAVA_HOME path



3.Download Postgres and install it. Set the path in environment variable



4.Download Perl and install it. Set path in environment variable



5.Unzip the opennms source code and put it your local server

  (Ex : D:\Workspace\OpenNMS\Source\opennms)



6.Set the mavan bin path in environment variable

  (Ex : D:\Workspace\OpenNMS\Source\opennms\maven\bin)



7.Enter into D:\Workspace\OpenNMS\Source\opennms> path



8.Clean your project

  (Ex : D:\Workspace\OpenNMS\Source\opennms>perl clean.pl)



9.Compile your opennms project

  (Ex : D:\Workspace\OpenNMS\Source\opennms>perl compile.pl)



10.Assemple your or build your project

  (Ex : D:\Workspace\OpenNMS\Source\opennms>perl assemple.pl -Dopennms.home=D:\Workspace\OpenNMS\Build)



11.Copy your build file opennms-1.13.0-SNAPSHOT.tar.gz from D:\Workspace\OpenNMS\Source\opennms\target folder



12.Put it your build opennms home location and unzip it

   (Ex : D:\Workspace\OpenNMS\Build)



13.Now your folder structure in build path should be the folllowing hira

   Build

     - bin

     - etc

     - ...



14.Create install.bat file with the following content



SET OPENNMS_HOME=D:/Workspace/OpenNMS/Build

SET DBNAME=opennms

SET DBURL=jdbc:postgresql://localhost:5432/

SET ETCDIR=%OPENNMS_HOME%/etc

SET SERVLETDIR=%OPENNMS_HOME%/webapps/opennms



"C:\Program Files\Java\jdk1.6.0_20\bin\java" -Xmx512m "-Dopennms.home=%OPENNMS_HOME%" "-Dinstall.dir=%OPENNMS_HOME%" "-Dinstall.database.name=%DBNAME%" "-Dinstall.database.url=%DBURL%" "-Dinstall.etc.dir=%ETCDIR%" "-Dinstall.servlet.dir=%SERVLETDIR%" -classpath
"%OPENNMS_HOME%/lib/opennms_bootstrap.jar;%OPENNMS_HOME%/lib/opennms_install.jar" org.opennms.install.Installer %*





15.Download jicmp.dll and jicmp6.dll file and put it in your java bin folder

  (Ex : C:\Program Files\Java\jdk1.6.0_20\bin)



16.Change your postgres password in D:\Workspace\OpenNMS\Build\etc\opennms-datasources.xml file



    <jdbc-data-source name="opennms-admin"



                        database-name="template1"



                        class-name="org.postgresql.Driver"



                        url="jdbc:postgresql://localhost:5432/template1"



                        user-name="postgres"



                        password="postgres" />



17.Create the opennms database for opennms source with help of install.bat file

  (Ex : D:\Workspace\OpenNMS\Build\bin>install.bat -d)



18.Create opennms.bat file with the following content to start opennms bulid



"C:\Program Files\Java\jdk1.6.0_20\bin\java" -Xmx512m -XX:MaxPermSize=256m -Dopennms.home="D:/Workspace/OpenNMS/Build" -Djava.endorsed.dirs="$OPENNMS_HOME/lib/endorsed" -jar "D:/Workspace/OpenNMS/Build/lib/opennms_bootstrap.jar" %*



19.To run the opennms server, Open cmd prompt in admin mode and run opennms.bat file

(Ex : D:\Workspace\OpenNMS\Build\bin>opennms.bat start)

作者:儱剑阿攵

转载请注明链接:http://blog.csdn.net/awenluck/article/details/38614139

OpenNMS编译,打包并在Windows下启动的更多相关文章

  1. windows下启动mysql服务的命令行启动和手动启动方法

    1.图形界面下启动mysql服务. 在图形界面下启动mysql服务的步骤如下: (1)打开控制面板->管理工具->服务,如下图所示: 可以看到Mysql服务目前的状态是未启动(未写已启动的 ...

  2. windows下启动Apache报443错误!

    windows下启动apache报make_sock: could not bind to address [::]:443错误! 查看指定端口的占用情况 netstat -aon|findstr & ...

  3. oracle在windows下启动时报错ora-28056

    windows下的的oracle ,实例启动时是会向windows操作系统的事件查看器--应用程序 部分写入启动信息的,并且这个写入行为无法用oracle 的参数或者其他手段去禁止. 若是事件查看器- ...

  4. windows下启动/关闭Sybase数据库服务器

    启动.关闭Sybase数据库服务器 一.启动Sybase服务器 在windows下介绍两种方法启动Sybase数据库服务器. 1.通过服务器管理器 依次打开控制面板>管理工具>服务 管理窗 ...

  5. windows 下启动运行 jar 包程序

    windows 下 运行 jar 包 java -jar XXX.jar java -server -Xms1024m -Xmx20480m -jar $JAR_NAME.jar windows 后台 ...

  6. windows下启动mysql服务

    当你无法连接你的mysql数据库时,或者因为某些原因导致与mysql数据库的连接丢失时,可通过以下方式启动mysql服务 1.命令行下启动mysql服务 以管理员身份运行cmd,进入mysql安装目录 ...

  7. reedis 解决在windows下启动闪退

    windows下安装https://github.com/MicrosoftArchive/redis/releases第一次启动报错: [2368] 21 Apr 02:57:05.611 # Cr ...

  8. Windows下启动ActiveMq端口被占用的解决办法

    cd /D E:\RuntimeSoft\apache-activemq-5.11.0\binactivemq.bat start结果提示:端口号被占用. Windows下查看端口号被占用开始--运行 ...

  9. Windows下启动、重启、停止nginx

    在Windows下操作nginx,需要打开cmd 进入到nginx的安装目录下 1.启动nginx: start nginx 或 nginx.exe 2.停止nginx(stop是快速停止nginx, ...

随机推荐

  1. LOJ P3952 时间复杂度 noip 暴力 模拟

    https://www.luogu.org/problemnew/show/P3952 模拟,日常认识到自己zz. #include<iostream> #include<cstdi ...

  2. 【DFS好题】BZOJ1999- [Noip2007]Core树网的核(数据加强版)

    NOIP的数据好水,一开始有好几个错结果NOIP数据就水过了?? [题目大意] 求无根树的直径上一段不超过S长的链,使得偏心距最小.具体概念见原题. [思路] 首先明确几个性质: (1)对于树中的任意 ...

  3. java 中常用的类

    java 中常用的类 Math Math 类,包含用于执行基本数学运算的方法 常用API 取整 l  static double abs(double  a) 获取double 的绝对值 l  sta ...

  4. lor框架代码分析

    属性 lor: version router route request response fn app create_app Router Route Request Response 属性 lor ...

  5. python开发_tkinter_菜单的不同选项

    python的tkinter模块中,菜单也可以由你自定义你的风格 下面是我做的demo 运行效果: ====================================== 代码部分: ===== ...

  6. Uva 12889 One-Two-Three

      Your little brother has just learnt to write one, two and three, in English. He has written a lot ...

  7. php 获取开始日期与结束日期之间所有日期

    话不多说,源码奉上! function getDateRange($startdate, $enddate) { $stime = strtotime($startdate); $etime = st ...

  8. Tasker to detect and vibrate once the ougoing call is being answered

    I happen to find that for GSM standard phone, call duration would be created into sql database only ...

  9. 邮件基本常识普及(to/cc/bcc)

    http://blog.sina.com.cn/s/blog_5572b4b5010009ul.html 前两天,某个同事发的一封邮件着实把我给郁闷了,他发的是图片形式的笑话,内容稍稍有点不太健康,这 ...

  10. Eclipse点不出方法了

    window→preferences→java→editor→Content Assist→Advanced 然后选中右上方的所有 右下方选中一个即可.