Gitlab在启动时自动启动

ATI*_*TTU 3 gitlab

首先,我对我的英语感到抱歉。

我最近在Debian 7.1服务器上安装了GitLab,并且无法在启动时启动。我已经检查了/etc/init.d,但是没有适用于Gitlab的脚本。

如何将Gitlab添加到启动中?

我已经从下载页面上使用了Omnibus deb安装程序,并且如果我运行“ gitlab-ctl start”,效果很好。

问候和感谢!

Sho*_*ita 5

在 CentOS 7 上,有一个符号链接,

/etc/systemd/system/default.target.wants/gitlab-runsvdir.service -> /opt/gitlab/embedded/cookbooks/runit/files/default/gitlab-runsvdir.service

而gitlab-runsvdir.service的内容是这样的

[Unit] Description=GitLab Runit supervision process

[Service] ExecStart=/opt/gitlab/embedded/bin/runsvdir-start
Restart=always
Run Code Online (Sandbox Code Playgroud)

我希望 Debian 7 中也有类似的。


小智 5

systemctl enable gitlab-runsvdir
Run Code Online (Sandbox Code Playgroud)

如果您的系统使用的是systemd(RHEL / CentOS 7)而不是init;这比较容易:)

 [meebo@server ~]# sudo systemctl enable gitlab-runsvdir
 Created symlink from /etc/systemd/system/basic.target.wants/gitlab-
 runsvdir.service to /usr/lib/systemd/system/gitlab-runsvdir.service.
Run Code Online (Sandbox Code Playgroud)