Gitblit环境搭建(w7 64位环境)


gitblit环境搭建(w7 64位环境)
为什么没用gitlab,集成的东西太多,短时间的搭建是很难的

Java环境搭建

省略,自行百度。本人Java环境是1.8.0_121

Gitblit搭建

下载地址(下载windows版本的):

http://www.gitblit.com/

下载完成后只需要解压即可,无需安装。
我的安装路径:

E:\git\gitblit-1.8.0

存储文件路径:

E:\git\gitReposittory    步骤3.1会用到

1.修改gitblit.properties配置文件(我的文件在E:\git\gitblit-1.8.0\data目录下面)

#
# GITBLIT.PROPERTIES
#
# Define your custom settings in this file and/or include settings defined in
# other properties files.
#

# Include Gitblit's 'defaults.properties' within your configuration.
#
# NOTE: Gitblit will not automatically reload "included" properties.  Gitblit
# only watches the 'gitblit.properties' file for modifications.
#
# Paths may be relative to the ${baseFolder} or they may be absolute.
#
# COMMA-DELIMITED
# SINCE 1.7.0
#include = defaults.properties   注释掉
include = my.properties   新建的文件名,步骤2会建立这个文件

# Define your overrides or custom settings below
#
  1. 添加新的文件
    复制defaults.properties,粘贴,重命名为my.properties (推荐不要直接修改文件名,留作备份比较好,万一文件被改坏了,还能继续复制使用)

  2. 修改my.properties 文件

git.repositoriesFolder = E:\git\gitReposittory
server.httpPort = 10101
server.httpBindInterface = 192.168.0.147   我的ip
server.httpsBindInterface = localhost
  1. 开启gitblit.cmd(E:\git\gitblit-1.8.0 目录下面)

    控制台出现started 没出现什么错误就表示开启了,接着打开浏览器输入http://192.168.0.147:10101 ,就可以看到网址了(中文)


以上基本的配置完成,因为是在win上的,我们可以设置以Windows Service方式启动Gitblit 1. 修改installService.cmd文件(最好事先备份一个纯净的,未修改的版本,改个名字而已,备用)
@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

@REM arch = x86, amd64, or ia32
SET ARCH=amd64
SET CD=E:\git\gitblit-1.8.0   你的安装目录
@REM Be careful not to introduce trailing whitespace after the ^ characters.
@REM Use ; or # to separate values in the --StartParams parameter.
"%CD%\%ARCH%\gitblit.exe"  //IS//gitblit ^
         --DisplayName="gitblit" ^
         --Description="a pure Java Git solution" ^
         --Startup=auto ^
         --LogPath="%CD%\logs" ^
         --LogLevel=INFO ^
         --LogPrefix=gitblit ^
         --StdOutput=auto ^
         --StdError=auto ^
         --StartPath="%CD%" ^
         --StartClass=org.moxie.MxLauncher ^
         --StartMethod=main ^
         --StartParams="" ^     这个里面的内容清空
         --StartMode=jvm ^
         --StopPath="%CD%" ^
         --StopClass=org.moxie.MxLauncher ^
         --StopMethod=main ^
         --StopParams="--stop;--baseFolder;%CD%\data" ^
         --StopMode=jvm ^
         --Classpath="%CD%\gitblit.jar" ^
         --Jvm=auto ^
         --JvmMx=1024
  1. 右键,以管理员的方式开启installService.cmd
  2. 这样就可以类似于mysql一样开启服务了,当然也可以不采用
    自己写脚本,花式启动各种我就不介绍了,爱怎么玩怎么玩

网页的初始登录用户名和密码都是admin
其他的操作本人还在学习,有时间再更新博客

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值