[Linux]-gitlab安装

使用国内镜像安装,新建 /etc/yum.repos.d/gitlab-ce.repo,添加以下内容

[gitlab-ce]
name=gitlab-ce
baseurl=http://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el6
repo_gpgcheck=0
gpgcheck=0
enabled=1
gpgkey=https://packages.gitlab.com/gpg.key

 

# 安装依赖包 sudo yum install curl openssh-server openssh-clients postfix cronie

# 启动 postfix 邮件服务 sudo service postfix start

# 检查 postfix sudo chkconfig postfix on

# 安装 GitLab 社区版 sudo yum install gitlab-ce

# 初始化 GitLab sudo gitlab-ctl reconfigure

修改主机host

添加访问的 host,修改/etc/gitlab/gitlab.rbexternal_url

 

external_url 'http://git.home.com'

vi /etc/hosts,添加 host 映射

本机IP git.home.com
每次修改/etc/gitlab/gitlab.rb,都要运行以下命令,让配置生效
sudo gitlab-ctl reconfigure
配置本机的 host,如: git.home.com。最后,在浏览器打开网址http://git.home.com,登陆。默认管理员:用户名: root

查看版本

cat /opt/gitlab/embedded/service/gitlab-rails/VERSION

汉化

git clone git clone https://gitlab.com/xhang/gitlab.git  -b  v10.8.5-zh
修改~/.bashrc,在“alias cp=’cp -i’”前加#注释,再刷新文件 source ~/.bashrc
cp -r -f  ./gitlab/*  /opt/gitlab/embedded/service/gitlab-rails/ 
gitlab-ctl reconfigure
gitlab-ctl restart

 

 

 

 

 

 

 

 

 

 

转载于:https://www.cnblogs.com/chenwz/p/10637496.html

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值