1. 安装并配置必要的依赖关系
# yum install -y curl policycoreutils-python openssh-server cronie
安装lokkit命令相关的包
# yum install system-config-firewall
# lokkit -s http -s ssh
接下来安装Postfix发送通知邮件
yum install postfix
service postfix start
chkconfig postfix on
2. 配置gitlab-ce的yum源
gitlab-ce是社区版,免费的
gitlab-ee是企业版,收费的
mwget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-10.3.0-ce.0.el7.x86_64.rpm
3.安装gitlab-ce
rpm -ivh gitlab-ce-10.3.0-ce.0.el7.x86_64.rpm
编辑配置文件:将external_url修改为你的ip和url
vim /etc/gitlab/gitlab.rb
external_url ‘http://ip’
修改后运行如下命令启动gitlab:
gitlab-ctl reconfigure
gitlab-ctl restart
然后通过/etc/gitlab/gitlab.rb中的external_url配置的url访问:http://ip
第一次访问会你设置密码
账户: root
然后,设置完成后就可以使用root账号登录了