1、基础环境准备
yum install curl policycoreutils openssh-server openssh-clients postfix -y systemctl start postfix
2、安装gitlab-ce
curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash yum install -y gitlab-ce
备注:由于网络原因可以使用其它网站的源
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
yum makecache yum install gitlab-ce -y
3、配置并启动gitlab-ce
gitlab-ctl reconfigure
查看gitlab状态
gitlab-ctl status
关闭gitlab:gitlab-ctl stop
启动gitlab:gitlab-ctl start
重启gitlab:gitlab-ctl restart
3、配置并启动gitlab-ce
修改访问页面URL
vim /etc/gitlab/gitlab.rb external_url 'http://gitlab.oceanwing.com'
4、登录,第一次需要设置密码
5、关闭注册 Admin-->settings --> Sign-in Restrictions