GitLab在Linux中的安装方式因发行版而异,以下是常见的Ubuntu/Debian和CentOS/RHEL系统的安装方法:
sudo apt update,sudo apt upgrade -y。sudo apt install -y curl openssh-server ca-certificates tzdata postfix。curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash。sudo EXTERNAL_URL="http://your_server_ip" apt install gitlab-ce -y。sudo gitlab-ctl reconfigure。sudo gitlab-ctl start。sudo yum update -y。sudo yum install -y curl policycoreutils-python openssh-server postfix。curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash。sudo EXTERNAL_URL="http://your_server_ip" yum install -y gitlab-ce。sudo gitlab-ctl reconfigure。sudo gitlab-ctl start。安装完成后,可通过浏览器访问http://your_server_ip,首次访问需设置管理员密码。