如何在构建源代码后启动opennms



我已经下载了opennms-source-1.10.0-2.tar并根据http://opennms.org/wiki/Eclipse_and_OpenNMS.

现在我想运行/启动opennnms,并根据我的业务需求开发代码。知道如何开始opennms吗?。

OpenNMS开发人员在Windows上的安装程序(可以在Windows中构建并启动服务器)

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:WorkspaceOpenNMSSourceopennms)
6.Set the mavan bin path in environment variable
  (Ex : D:WorkspaceOpenNMSSourceopennmsmavenbin)
7.Enter into D:WorkspaceOpenNMSSourceopennms> path
8.Clean your project 
  (Ex : D:WorkspaceOpenNMSSourceopennms>perl clean.pl)
9.Compile your opennms project
  (Ex : D:WorkspaceOpenNMSSourceopennms>perl compile.pl)
10.Assemple your or build your project
  (Ex : D:WorkspaceOpenNMSSourceopennms>perl assemple.pl -Dopennms.home=D:WorkspaceOpenNMSBuild)
11.Copy your build file opennms-1.13.0-SNAPSHOT.tar.gz from D:WorkspaceOpenNMSSourceopennmstarget folder
12.Put it your build opennms home location and unzip it
   (Ex : D:WorkspaceOpenNMSBuild)
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 FilesJavajdk1.6.0_20binjava" -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 FilesJavajdk1.6.0_20bin)
16.Change your postgres password in D:WorkspaceOpenNMSBuildetcopennms-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:WorkspaceOpenNMSBuildbin>install.bat -d)
18.Create opennms.bat file with the following content to start opennms bulid
"C:Program FilesJavajdk1.6.0_20binjava" -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:WorkspaceOpenNMSBuildbin>opennms.bat start)

开发

  1. 下载opennms代码并通过在opennms主目录中提供"sudomvn-install-DskipTests"来构建它。注意-确保您可以完全访问互联网,否则编译可能会失败
  2. 当你有8GB的RAM机器时,构建将在不到15分钟内完成
  3. 现在转到openmshomedirectory/bin并发出"sudo opennms start",这将启动您的opennms
  4. 根据您的业务需求添加java文件或模块
  5. 再次构建项目,在各自的maven项目文件夹中,您将拥有pom.xml和生成的目标文件夹。转到目标文件夹并复制jar,将其放在已安装的opennms目录/usr/share/opennms/lib中,然后重新启动服务器

最新更新