Install and configure the gitblit server in the windows environment to solve the problem of service startup failure: Failed creating java ServiceStart returned 1

1. Environmental requirements

You need to follow jdk1.8 first, and configure the environment variable
gitblit download: http://www.gitblit.com/

2. Install gitblit

Download and unzip:
insert image description here
Create a code warehouse folder
insert image description here
Find .../data/gitblit.properties, add configuration:

#存储项目代码的文件夹路径
git.repositoriesFolder=E:\install\gitblit-1.9.3\projectcode
#http协议的端口号,唯一且未被占用的端口号
server.httpPort=5544
#设定服务器的IP地址
server.httpBindInterface=192.12.1.1

insert image description here

3. Start by command line

Double-click to start: gitblit.cmd
insert image description here
starts successfully
insert image description here

Open the browser, enter ip+configured port to access
the default administrator account password: admin/admin
insert image description here

4. Install as a service and start automatically at boot

Edit.../gitblit-1.9.3/installService.cmd
1.SET ARCH=amd64 (for 64-bit) or SET ARCH=x86 (for 32-bit)
2. Set startup parameters to empty --StartParams="" ^
insert image description here
After saving, Right-click installService.cmd to run as administrator. Then win+r enter services.msc to enter the service list, find gitblit right click to start,默认开机自启

insert image description here

5. After installing as a service, start an error

Error message:

[2023-08-09 20:48:43] [error] Failed creating java 
[2023-08-09 20:48:43] [error] ServiceStart returned 1
[2023-08-09 20:48:43] [info]  Run service finished.

solution:

  1. Check whether the number of digits of SET ARCH is consistent with that of your computer
  2. Right-click gitblitw.exe to run as an administrator, remove the Use default check, then select the jvm.dll file under your own jdk, click Apply to
    insert image description here
    delete the original service, run cmd as an administrator, and enter sc delete gitblit to remove the service name , and then reinstall the service

Guess you like

Origin blog.csdn.net/qq_29864051/article/details/132197450