← 返回命令列表

Linux command

gitlab-ctl 命令

安全

权限或系统影响较大,执行前请核对目标。

常用示例

Start GitLab

sudo gitlab-ctl start

Stop GitLab

sudo gitlab-ctl stop

Restart GitLab

sudo gitlab-ctl restart

Show status

sudo gitlab-ctl status

Reconfigure GitLab

sudo gitlab-ctl reconfigure

View logs

sudo gitlab-ctl tail

View specific service logs

sudo gitlab-ctl tail [nginx]

说明

gitlab-ctl controls an Omnibus GitLab installation. It manages all GitLab services (nginx, PostgreSQL, Redis, Puma, Sidekiq, etc.), applies configuration changes from `/etc/gitlab/gitlab.rb`, and provides debugging tools. The `reconfigure` command is used after modifying `gitlab.rb` to apply the new settings.

FAQ

What is the gitlab-ctl command used for?

gitlab-ctl controls an Omnibus GitLab installation. It manages all GitLab services (nginx, PostgreSQL, Redis, Puma, Sidekiq, etc.), applies configuration changes from `/etc/gitlab/gitlab.rb`, and provides debugging tools. The `reconfigure` command is used after modifying `gitlab.rb` to apply the new settings.

How do I run a basic gitlab-ctl example?

Run `sudo gitlab-ctl start` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

Where can I find more gitlab-ctl examples?

This page includes 7 examples for gitlab-ctl, plus related commands for nearby Linux tasks.