首先安装依赖软件
yum -y install policycoreutils openssh-server openssh-clients postfix
设置 postfix 开机自启,并启动,postfix 支持 gitlab 发信功能
systemctl enable postfix && systemctl start postfix
下载 gitlab 安装包,然后安装
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-8.0.0-ce.0.el7.x86_64.rpm
rpm -i gitlab-ce-8.0.0-ce.0.el7.x86_64.rpm
修改 gitlab 配置文件指定服务器IP和自定义端口
vim /etc/gitlab/gitlab.rb
external_url 'http://ip或域名:9999'
重置并启动 gitlab
gitlab-ctl reconfigure
gitlab-ctl restart
访问 gitlab 页面,如果没有域名,直接输入服务器 ip 和指定端口进行访问, 初始账户 root 密码 5iveL!fe,第一次登录修改密码

