在 Linux 上启动 GitLab 取决于你的安装方式,常见情况如下:
sudo gitlab-ctl start
sudo gitlab-ctl stop
sudo gitlab-ctl restart
sudo gitlab-ctl status
Omnibus 安装默认会注册 systemd 服务,一般无需手动设置:
sudo systemctl enable gitlab-runsvdir.service
sudo systemctl start gitlab-runsvdir.service
docker start gitlab
(假设容器名为 gitlab)
docker run --detach \
--hostname gitlab.example.com \
--publish 443:443 --publish 80:80 --publish 22:22 \
--name gitlab \
--restart always \
gitlab/gitlab-ee:latest
docker logs -f gitlab
sudo service gitlab start
# 或
sudo /etc/init.d/gitlab start
或使用 systemd:
sudo systemctl start gitlab
http://服务器IP
rootsudo cat /etc/gitlab/initial_root_password
修改配置:
sudo vim /etc/gitlab/gitlab.rb
external_url 'http://IP:端口'
然后:
sudo gitlab-ctl reconfigure
GitLab 组件多,首次启动可能需 1–3 分钟。
如果你能告诉我:
我可以给你更精确的启动命令。