一、简介
??服务器采用的是腾讯的2核4GB的轻量型应用服务器,操作系统镜像CentOS7.6。
二、步骤
1.安装SSH
sudo yum install -y curl policycoreutils-python openssh-server
sudo systemctl enable sshd
sudo systemctl start sshd
2.防火墙开启http
sudo firewall-cmd --permanent --add-service=http
sudo systemctl reload firewalld
3.安装Postfix邮件服务
sudo yum install postfix
sudo systemctl enable postfix
sudo systemctl start postfix
4.安装GitLab
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-10.0.0-ce.0.el7.x86_64.rpm
rpm -i gitlab-ce-10.0.0-ce.0.el7.x86_64.rpm
vim /etc/gitlab/gitlab.rb
external_url 'http://服务器ip:8090'
unicorn['port'] = 8091
gitlab_workhorse['auth_backend'] = "http://localhost:8091"
firewall-cmd --zone=public --add-port=8090/tcp --permanent
firewall-cmd --reload
gitlab-ctl reconfigure
gitlab-ctl restart
ip+端口号访问,出现如下页面表示搭建成功了
|