1、基础环境准备
1
2
|
yum
install
curl policycoreutils openssh-server openssh-clients postfix -y
systemctl start postfix
|
2、安装gitlab-ce
1
2
|
curl -sS https:
//packages
.gitlab.com
/install/repositories/gitlab/gitlab-ce/script
.rpm.sh |
sudo
bash
yum
install
-y gitlab-ce
|
备注:由于网络原因可以使用其它网站的源
1
2
3
4
5
6
7
8
|
vim
/etc/yum
.repos.d
/gitlab-ce
.repo
[gitlab-ce]
name=gitlab-ce
baseurl=https:
//mirrors
.tuna.tsinghua.edu.cn
/gitlab-ce/yum/el7/
repo_gpgcheck=0
gpgcheck=0
enabled=1
gpgkey=https:
//packages
.gitlab.com
/gpg
.key
|
1
2
|
yum makecache
yum
install
gitlab-ce -y
|
3、配置并启动gitlab-ce
1
|
gitlab-ctl reconfigure
|
查看gitlab状态
1
|
gitlab-ctl status
|
关闭gitlab:gitlab-ctl stop
启动gitlab:gitlab-ctl start
重启gitlab:gitlab-ctl restart
3、配置并启动gitlab-ce
修改访问页面URL
1
2
|
vim
/etc/gitlab/gitlab
.rb
external_url
'http://gitlab.oceanwing.com'
|
4、登录,第一次需要设置密码
5、关闭注册 Admin-->settings --> Sign-in Restrictions
本文转自 喵来个鱼 51CTO博客,原文链接:http://blog.51cto.com/m51cto/1959159,如需转载请自行联系原作者