无法将Artifactory安装为Windows服务

编程入门 行业动态 更新时间:2024-10-28 08:19:29
本文介绍了无法将Artifactory安装为Windows服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有Artifactory artifactory-oss-6.10.1,我尝试将其安装为Windows服务.

I have Artifactory artifactory-oss-6.10.1, that I try to install as Windows service.

我遇到的第一个问题是installService.bat包含行

First problem I encounter is that the installService.bat has the lines

:gotJdkHome if not exist "%JAVA_HOME%\jre\bin\java.exe" goto noJavaHome if not exist "%JAVA_HOME%\jre\bin\javaw.exe" goto noJavaHome

我已经安装了JDK 12,并将其设置为JAVA_HOME,但是我的JDK安装中没有jre文件夹.我从oracle重新下载了jdk 12,但是安装没有提供jre文件夹

I have JDK 12 installed and set as JAVA_HOME, but my JDK installation has no jre folder. I re-downloaded the jdk 12 from oracle, but the installation gives no jre folder

删除文件的jre路径后,由于缺少tomcat(?),安装失败(它只是说找不到路径).

After I removed the jre path of the file, the installation fails due to a missing tomcat (?) (it just say that it cannot find the path).

所以我需要额外安装tomcat吗?因为,当我简单地启动artifactory.bat时,Artifactory就会启动.

So do I need to additionally install tomcat ? Because, when i simply start the artifactory.bat, Artifactory starts up.

那么如何将Artifactory作为Windows服务安装?

So how can I install Artifactory as windows service ?

推荐答案

我也为此苦苦挣扎,并设法找到一种解决方案来安装该服务.

I struggled with this as well and managed to find a solution to get the service installed.

打开您的InstallService.bat文件.找到:gotJdkHome部分.从如下路径中删除\ jre:

Open your InstallService.bat file. Locate the :gotJdkHome section. Remove \jre from the pathes like the following:

:gotJdkHome if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome if not exist "%JAVA_HOME%\bin\javaw.exe" goto noJavaHome if not exist "%JAVA_HOME%\bin\javac.exe" goto noJavaHome if not "%JRE_HOME%" == "" goto okJavaHome set "JRE_HOME=%JAVA_HOME%"

然后,您将能够运行InstallService.bat,并且将安装该服务.

Then you will be able to run the InstallService.bat and the service will be installed.

但是,您将无法启动服务,因为Java 10不支持JVM参数"java.endorsed.dirs".

But you will not be able to launch the service because the JVM argument "java.endorsed.dirs" is not supported from Java 10.

您必须将其从文件底部的以下行中删除:

You have to remove it from the following line in the bottom of the file:

"%EXECUTABLE%" //US//%SERVICE_NAME% --JvmOptions "-Dcatalina.base=%CATALINA_BASE%;-Dcatalina.home=%CATALINA_HOME%;-Djava.endorsed.dirs=%CATALINA_HOME%\endorsed" --StartMode jvm --StopMode jvm

为了获得

"%EXECUTABLE%" //US//%SERVICE_NAME% --JvmOptions "-Dcatalina.base=%CATALINA_BASE%;-Dcatalina.home=%CATALINA_HOME%" --StartMode jvm --StopMode jvm

现在,您的服务将可以启动.

Now your service will be able to start up.

更多推荐

无法将Artifactory安装为Windows服务

本文发布于:2023-11-06 22:04:18,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1564792.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Artifactory   Windows

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!