1、安装gitlab
运行一下脚本在centos7安装gitlab
#!/bin/bash
set -x
echo "install pre install package in localhost"
sudo yum install curl openssh-server -y
sudo systemctl enable sshd
sudo systemctl start sshd
sudo yum install postfix -y
sudo systemctl enable postfix
sudo systemctl start postfix
echo "config gitlab-ce qinghua yum repo"
echo -e "[gitlab-ce]\nname=Gitlab CE Repository\nbaseurl=https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el\$releasever/\ngpgcheck=0\nenabled=1" > /etc/yum.repos.d/gitlab-ce.repo
echo "install gitlab-ce in localhost"
sudo yum makecache
sudo yum install gitlab-ce -y
set +x
2、修改配置并启动gitlab服务器
/etc/gitlab/gitlab.rb为配置文件
# vi /etc/gitlab/gitlab.rb #该配置文件注释有详细说明,一般用途不作修改
执行一下命令启动gitlab服务器
# sudo gitlab-ctl reconfigure