摘要
GitLab 是一个用于仓库管理系统的开源项目,使用Git作为代码管理工具,并在此基础上搭建起来的web服务。
官方文档
https://about.gitlab.com/installation/
centos6 安装
依赖
1
2
| yum install -y curl policycoreutils-python openssh-server cronie
lokkit -s http -s ssh
|
邮件服务
1
2
3
| yum install postfix # 安装期间会出现配置信息
service postfix start
chkconfig postfix on
|
配置postfix
1
| vim /etc/postfix/main.cf
|
参考地址:
https://www.cnblogs.com/ilanni/p/5294611.html
添加并安装gitLab包库
1
2
3
4
5
6
7
8
9
| curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.rpm.sh | sudo bash
vim /etc/yum.repos.d/gitlab-ee.repo
[gitlab-ee]
name=Gitlab EE Repository
baseurl=https://mirrors.tuna.tsinghua.edu.cn/gitlab-ee/yum/el6/
gpgcheck=0
enabled=1
yum makecache
yum -y install gitlab-ee
|
配置gitLab
1
| vim /etc/gitlab/gitlab.rb
|
GitLab常用命令
1
2
3
4
5
6
7
| gitlab-ctl start # 启动所有 gitlab 组件;
gitlab-ctl stop # 停止所有 gitlab 组件;
gitlab-ctl restart # 重启所有 gitlab 组件;
gitlab-ctl status # 查看服务状态;
gitlab-ctl reconfigure # 启动服务;
gitlab-rake gitlab:check SANITIZE=true --trace # 检查gitlab;
gitlab-ctl tail # 查看日志;
|
系统管理员
卸载
1
2
| rpm -e gitlab-ee
rm -rf /etc/gitlab /var/log/gitlab /var/opt/gitlab /opt/gitlab
|
GitLab 接入 OpenLDAP和AD域
参考地址:https://www.linuxidc.com/Linux/2018-01/150516.htm