在Linux上配置GitLab一般有以下步骤:
sudo apt update和sudo apt install -y curl openssh-server ca-certificates postfix;对于CentOS/RHEL系统,使用sudo yum update -y和sudo yum install -y curl policycoreutils-python openssh-server postfix。curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash,CentOS/RHEL系统执行curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash。sudo apt-get install gitlab-ce,CentOS/RHEL系统用sudo yum install -y gitlab-ce。/etc/gitlab/gitlab.rb文件,设置external_url等参数,如external_url 'http://your-server-ip:port',还可配置数据库、邮件等。sudo gitlab-ctl reconfigure应用配置,再用sudo gitlab-ctl start启动服务。sudo ufw allow 'Nginx Full'和sudo ufw enable;若使用firewalld,执行sudo firewall-cmd --permanent --add-service=http和sudo firewall-cmd --permanent --add-service=https,然后sudo systemctl reload firewalld。