我有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服务
发布评论