gitlab安装

git 2017-12-03 浏览(5643 评论(0

官方文档:https://about.gitlab.com/downloads/#centos6

sudo yum install curl openssh-server openssh-clients postfix cronie
sudo service postfix start
sudo chkconfig postfix on
sudo lokkit -s http -s ssh

curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
sudo yum install gitlab-ce
这里下载会很慢,所以执行下面操作

新建vim /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 makecache
	sudo yum install gitlab-ce
修改对外开放域名或ip:
	vi /etc/gitlab/gitlab.rb
执行 GitLab:
	sudo gitlab-ctl reconfigure
访问ip
	默认账号:root
	默认密码:5iveL!fe

停止GitLab
	gitlab-ctl stop

重新启动
	gitlab-ctl restart
查看状态:
	gitlab-ctl status

GitLab 默认存放目录到 /var/opt/gitlab
安装详情请查看https://learn.vgoing.net/index.php/archives/267/以及https://mirror.tuna.tsinghua.edu.cn/help/gitlab-ce/

打赏

如果此文对你有所帮助,请随意打赏鼓励作者^_^

黄信强博客