安装依赖
yum install curl policycoreutils openssh-server openssh-clients
systemctl enable sshd
systemctl start sshd
yum install postfix
systemctl enable postfix
systemctl start postfix
sudo firewall-cmd --permanent --add-service=http
sudo systemctl reload firewalld
安装GitLab
curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
yum install gitlab-ce-8.15.3-ce.0.el7.x86_64
下载可能很慢或者失败,可以访问:
https://packages.gitlab.com/gitlab/gitlab-ce 选择合适的版本下载,手动安装rpm包。
配置并启动GitLab
根据个人环境修改访问地址,编辑 /etc/gitlab/gitlab.rb 文件,修改 external_url 'http://127.0.0.1" 为 external_url 'http://my_ip:9090"。
启动GitLab
gitlab-ctl reconfigure
修改配置后都要重新加载配置
启动完成后,打开浏览器访问设置的IP,就会打开页面,会让你修改 root 账号的密码,修改成功后就可以登录了。