CentOS7安装私有gitlab

1.安装依赖包

yum install -y curl policycoreutils openssh-server openssh-clients postfix
systemctl start postfix
systemctl enable postfix

2.安装gitlab,由于国内网络偏慢,这里使用清华大学的镜像源进行安装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/el7
repo_gpgcheck=0
gpgcheck=0
enabled=1
gpgkey=
#yum makecache 
#yum repolist 
#yum install gitlab-ce -y 

3.修改配置文件

#vim /etc/gitlab/gitlab.rb 
external_url 'http://192.168.1.32'          //修改成本机ip
#gitlab-ctl reconfigure                     //重新加载文件配置,这一步比较漫长

4.gitlab常用命令

gitlab-ctl stop                             //关闭gitlab
gitlab-ctl start                            //启动gitlab
gitlab-ctl restart                          //重启gitlab

注意:gitlab默认情况使用的是80端,其它服务不要占用默认80端口
5.浏览器访问,默认管理用户名是root

猜你喜欢

转载自www.cnblogs.com/lovelinux199075/p/9071776.html