Stop Gitlab via Command Line

Posted on

In this article, stopping Gitlab’s service will be an action which is an important information to be recognized. Especially if there is a conflict for port usage with another service or application running since the port configuration will have to change Gitlab’s configuration file and going further, the service itself needs to be restarted or to be stop before the service is finally executed to start again.

The command which is used to stop Gitlab’s service is easy and it is actually comprise of short command as shown below :

gitlab-ctl stop

If the command is successfully executed, the output of the above command can be shown as follows :

root@hostname:~# gitlab-ctl stop
ok: down: gitlab-workhorse: 153487s, normally up
ok: down: logrotate: 153487s, normally up
ok: down: nginx: 153486s, normally up
ok: down: postgresql: 153486s, normally up
ok: down: redis: 153486s, normally up
ok: down: sidekiq: 153484s, normally up
ok: down: unicorn: 153484s, normally up
root@hostname:~# 

The above output in the real condition executed in a Guest Machine or Virtual Server running with the help of Virtual Machine Manager can be shown below :

In the above is a Guest Machine with CentOS 7 installed. Having a running Gitlab installed, the above command typed in the command line, ‘gitlab-ctl stop’ will automatically stop Gitlab’s service.

To be able to install Gitlab, read the following article titled ‘Install Gitlab on CentOS 7 via Command Line’ and it can be visited in this link. On another article titled ‘Install Gitlab in Ubuntu via Command Line’, it is also given information on installing Gitlab which is available in this link.

But before stop Gitlab’s service, the most important thing to do is to check the status of the service itself. Whether Gitlab’s service has already running or the Gitlab service is currently stop. Checking the status of Gitlab’s service can be done and this link contains further reference for doing it. It is an article titled ‘Check Gitlab Status via Command Line’.

Leave a Reply