gitblit的创建下载和自启(linux)

1 篇文章 0 订阅
1 篇文章 0 订阅

gitblit的创建下载和自启(linux)

下载

wget https://github.com/gitblit-org/gitblit/releases/download/v1.9.3/gitblit-1.9.3.tar.gz

下载不下来就科学上网去https://github.com/gitblit-org/gitblit/releases找版本下载后传至服务器

安装

tar -xzf gitblit-1.9.3.tar.gz 

配置

设置项目地址
/app/deploy是我设置的项目地址
vi /usr/local/gitblit-1.9.3/data/gitblit.properties

#
# 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

#
# Define your overrides or custom settings below
#
#

# SINCE 0.5.0

# RESTART REQUIRED

# BASEFOLDER

git.repositoriesFolder = /app/deploy

端口配置
vi /usr/local/gitblit-1.9.3/data/gitblit.properties


然后按esc后键盘输入2069gg

在这里插入图片描述
改http和https的端口号

自启文件设置,看你的机器是什么就配置这里的什么文件
在这里插入图片描述
在这里插入图片描述
我的是os就编辑这个文件
在这里插入图片描述
这是我的下载地址是/usr/local/gitblit-1.9.3就改成这样

GITBLIT_PATH=/usr/local/gitblit-1.9.3
GITBLIT_BASE_FOLDER=/usr/local/gitblit-1.9.3/data
GITBLIT_HTTP_PORT=8888
GITBLIT_HTTPS_PORT=8443

设置自启

测试是否启动

sh /usr/local/gitblit-1.9.3/service-centos.sh start

成功启动有界面后将其加入自启列表

vi /etc/rc.local 

加到末尾!!别删了里面的东西!!
在这里插入图片描述

你要是嫌麻烦记不住路径就设置一个路径在/etc/profile文件中自启配置这个文件就有路径了
一样加在文件最后别把里面的东西删了!!
vi /etc/profile

export  PATH=${PATH}:/usr/local/gitblit-1.9.3/service-centos.sh

在这里插入图片描述
然后停服务就用这个就行了

service-centos.sh stop

在这里插入图片描述

  • 5
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值