curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash
curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
sudo apt-get install gitlab-ce
(Debian/Ubuntu)sudo yum install gitlab-ce
(CentOS/RHEL)sudo ./install.sh
),完成后重启GitLab服务:sudo gitlab-ctl restart
。/etc/gitlab/gitlab.rb
)设置参数,修改后执行sudo gitlab-ctl reconfigure
生效。sudo gitlab-ctl check-update
。sudo gitlab-ctl stop
。sudo apt purge gitlab-ce
),或手动删除文件和配置。注意:部分插件(如CI/CD相关)需通过.gitlab-ci.yml
配置文件或GitLab Runner配合使用。操作前建议备份数据,复杂插件建议参考官方文档。