第一步
安装电子邮件服务器
yum install curl policycoreutils openssh-server openssh-clients postfix -y
service postfix start
chkconfig postfix on
如果出现错误“Job for postfix.service failed because the control process exited with error code. See "systemctl status postfix.service...”
则修改 /etc/postfix/main.cf的设置
inet_protocols = ipv4
inet_interfaces = all
第二步
关闭防火墙
iptables -F #清空规则
systemctl stop firewalld
systemctl disable firewalld
第三步
安装gitlab-ce
# vim /etc/yum.repos.d/gitlab-ce.repo
在repo文件中添加以下内容,保存并退出:
[gitlab-ce]
name=Gitlab CE Repository
baseurl=https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el$releasever/
gpgcheck=0
enabled=1
然后更新本地yum缓存,提高搜索安装软件的速度
# sudo yum makecache
准备就绪,开始安装gitlab最新版,这个安装将会安装gitlab所需的所有环境,一步到位,装好即用
# sudo yum install gitlab-ce
安装完之后需要使服务生效
# sudo gitlab-ctl reconfigure
然后启用gitlab组件就能运行了
# sudo gitlab-ctl start
最后修改一下配置文件内访问路径,修改为服务器的域名
vim /etc/gitlab/gitlab.rb
将 external_url 'http://gitlab.example.com' 改为 external_url '你的服务器域名或ip'