centos7安装gitlab

参考:https://www.cnblogs.com/wenwei-blog/p/5861450.html

https://blog.csdn.net/jiangtao_st/article/details/73612298

gitlab安装
指定版本gitlab10.7.3安装
一、环境准备
操作系统:CentOS Linux release 7.3.1611 (Core)
gitlab版本: gitlab-ce-10.7.3-ce.0.el7.x86_64.rpm

二、安装前准备
1. 安装依赖软件
yum -y install policycoreutils openssh-server openssh-clients postfix

2.设置postfix开机自启,并启动,postfix支持gitlab发信功能
systemctl enable postfix && systemctl start postfix

三、Gitlab安装及配置
1、下载镜像:
清华大学开源软件镜像站
centos 6系统的下载地址:https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el6
centos 7系统的下载地址:https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-10.7.3-ce.0.el7.x86_64.rpm

2、安装
yum install -y gitlab-ce-10.7.3-ce.0.el7.x86_64.rpm

延伸:卸载gitlab

查看安装包名称
yum list install gitlab*
卸载gitlab
yum remove gitlab-ce.x86_64

查找gitlab残余文件

find / -name gitlab

删除残余文件(rm,谨慎使用)



3、修改配置文件gitlab.rb
external_url 'http://gitlab.example.com'
grep -n '^'[a-Z] /etc/gitlab/gitlab.rb

13:external_url 'http://172.16.8.200'
user["username"]="gitlab"
user["group"]="gitlab"

执行配置gitlab ,使得修改生效。
gitlab-ctl reconfigure



停止gitlab服务
gitlab-ctl stop


4、中文补丁

查看版本
cat /opt/gitlab/embedded/service/gitlab-rails/VERSION
10.7.3
yum -y install git # 已经安装git不用再安装了。

克隆获取汉化版本库
git clone https://gitlab.com/xhang/gitlab.git

查看该汉化补丁的版本
cat gitlab/VERSION
10.2.3

cd /root/gitlab/
git diff v10.0.0 v10.0.0-zh >/tmp/10.0.0-zh.diff

yum install patch -y
patch -d /opt/gitlab/embedded/service/gitlab-rails -p1 < /tmp/10.0.0-zh.diff

启动gitlab
gitlab-ctl start

重新配置gitlab
gitlab-ctl reconfigure

5、访问 GitLab页面
如果没有域名,直接输入服务器ip和指定端口进行访问
初始账户: root 密码: 5iveL!fe
第一次登录修改密码

如果出现502,解决办法如下:
https://docs.gitlab.com/omnibus/settings/unicorn.html
设置/etc/gitlab/gitlab.rb。
unicorn['worker_processes'] = 3
unicorn['worker_timeout'] = 60
运行sudo gitlab-ctl reconfigure以使更改生效。
worker_processes为了使网页编辑器正常工作,最低要求是2。

gitlab使用教程
https://blog.csdn.net/Adelly/article/details/79099772


————————————————————————————
win7和gitlab建立连接
https://www.cnblogs.com/hafiz/p/8146324.html
ssh-keygen -t rsa -C 'XXXXX@qq.com'

gitlab 仓库存放地址
默认存放在:/var/opt/gitlab/git-data

修改默认仓库地址
https://blog.whsir.com/post-1490.html

gitlab启用https过程
https://blog.csdn.net/yan7895566/article/details/79310171
http://dos2unix.cn/link/389

原文地址:https://www.cnblogs.com/andy9468/p/11269441.html