安装前需要修改hostname,并且讲修改后的hostname添加到/etc/hosts下
1.安装基础包
yum install -y curl openssh-server openssh-clients cronie
2.设置防火墙,也可以手动修改iptables
lokkit -s http -s ssh
3.安装邮件服务
yum install postfix
service postfix start
chkconfig postfix on
4.下载安装脚本并执行
curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
5.安装gitlab
yum install -y gitlab-ce
6.初始化gitlab配置文件
打开/etc/gitlab/gitlab.rb,将其中external_url 'http://gitlab.example.com'修改为需要的地址或ip
gitlab-ctl reconfigure
7.打开web端修改密码,超级管理员默认账号[email protected]
升级
1.备份数据
gitlab-rake gitlab:backup:create STRATEGY = copy
2.升级gitlab
yum install -y gitlab-ce