栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

git私服搭建

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

git私服搭建

1.安装配置好java环境

2.下载Git服务器软件Gitblit

下载网址:Gitblithttp://www.gitblit.com/

3.Gitblit配置项目修改

在Gitblit的安装目录下的data目录下,找到文件default.properties,server.httpPort,设置服务端口号:

server.httpBindInterface,设置Gitblit的http普通连接的服务器地址为localhost

查找server.httpsBindInterface,设置Gitblit的http安全连接的服务器地址为localhost

4、启动Gitblit

返回Gitblit安装路径,双击启动gitblit.cmd,不要关闭新弹出的cmd窗口

打开浏览器,输入以下网址:http://localhost:65530/,显示如下页面则Gitblit安装成功

5、将Gitblit设置为windows服务

记事本打开Gitblit下的installService.cmd,检查:

SET ARCH=amd64,这里如果服务器是32位系统,amd64修改为x86,是64位系统,不要修改

添加:

SET gbhome=D:DevelopGitblit,将这一行代码添加到SET ARCH下方,注意路径修改为自己的Gitblit的安装路径

修改:

--StartParams="" ^,清空StartParams双引号内的所有变量,置为空即可

@REM Install Gitblit as a Windows service.

@REM gitblitw.exe (prunmgr.exe) is a GUI application for monitoring 
@REM and configuring the Gitblit procrun service.
@REM
@REM By default this tool launches the service properties dialog
@REM but it also has some other very useful functionality.
@REM
@REM http://commons.apache.org/daemon/procrun.html

@SETLOCAL

@REM arch = x86, amd64, or ia32
SET ARCH=amd64
SET gbhome=E:gitservicegitblit-1.9.2
@SET gbhome=%gbhome:~0,-1%

@REM Be careful not to introduce trailing whitespace after the ^ characters.
@REM Use ; or # to separate values in the --StartParams parameter.
"%gbhome%%ARCH%gitblit.exe"  //IS//gitblit ^
		 --DisplayName="gitblit" ^
		 --Description="a pure Java Git solution" ^
		 --Startup=auto ^
		 --LogPath="%gbhome%logs" ^
		 --LogLevel=INFO ^
		 --LogPrefix=gitblit ^
		 --StdOutput=auto ^
		 --StdError=auto ^
		 --StartPath="%gbhome%" ^
		 --StartClass=com.gitblit.GitBlitServer ^
		 --StartMethod=main ^
		 --StartParams="--storePassword;gitblit;--baseFolder;%gbhome%data" ^
		 --StartMode=jvm ^
		 --StopPath="%gbhome%" ^
		 --StopClass=com.gitblit.GitBlitServer ^
		 --StopMethod=main ^
		 --StopParams="--stop;--baseFolder;%gbhome%data" ^
		 --StopMode=jvm ^
		 --Classpath="%gbhome%gitblit.jar;%gbhome%ext*" ^
		 --Jvm=auto ^
		 --JvmMx=1024

@ENDLOCAL

修改完毕保存后管理员身份运行启动,在服务中可以看到gitblit服务已存在

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/741386.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号