gitlab远程仓库
需要4G运行内存的机器,20G
配置环境
yum install -y curl openssh-server openssh-clients postfix cronie policycoreutils-python
配置git
yum install -y git
git config --global user.name 'XXX'
git config --global user.email 'XXX@163.com'
git config --global color.ui true
git config --list |tail -3
关闭防火墙
systemctl stop iptables firewalld
systemctl disable iptables firewalld
sed -i '/SELINUX=/cSELINUX=disabled' /etc/selinux/config
配置阿里源
# 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
Enabled=1
Gpgkey=https://packages.gitlab.com/gpg.key
安装gitlab-ce
yum -y install gitlab-ce
PS:找不到key,请如下操作
ls /var/cache/yum/x86_64/7/gitlab-ce/packages/
cd /var/cache/yum/x86_64/7/gitlab-ce/packages/
yum localinstall -y gitlab-ce-14.6.1-ce.0.el7.x86_64.rpm 即可安装
修改配置文件
vim /etc/gitlab/gitlab.rb
grep "^external_url" /etc/gitlab/gitlab.rb
external_url 'http://172.17.0.61' #绑定监听的域名或IP
fuser -k 80/tcp
再次启动
gitlab-ctl start