Ubuntu 配置 Bitnami Gitlab 自启动

How to start automatically the Stack on Linux?

You can find below how to make the BitNami Stack servers start at boot time. To do that it is necessary to install the main "ctlscript.sh" as a service.  It is important that you installed the Stack as root user and you will need root privileges to do it.

Debian-like distribution (Debian, Ubuntu, etc)

1. Copy the installdir/ctlscript.sh file to /etc/init.d . It is advisable to rename this script to something more specific, like “bitnami-drupal”.

$ sudo cp ${installdir}/ctlscript.sh /etc/init.d/bitnami-drupal

2. We will use rc-update.d to add the script to the desired runlevels.

$ sudo update-rc.d -f bitnami-drupal start 80 2 3 4 5 . stop 30 0 1 6 .

As you can see, we define the priority (80 for start and 30 for stop) and the runlevels in which the script will be executed. The result of this command will be something like

Adding system startup for /etc/init.d/bitnami-drupal ...
 /etc/rc0.d/K30bitnami-bitnami-drupal -> ../init.d/drupal
 /etc/rc1.d/K30bitnami-bitnami-drupal -> ../init.d/drupal
 /etc/rc6.d/K30bitnami-drupal -> ../init.d/bitnami-drupal
 /etc/rc2.d/S80bitnami-drupal -> ../init.d/bitnami-drupal
 /etc/rc3.d/S80bitnami-drupal -> ../init.d/bitnami-drupal
 /etc/rc4.d/S80bitnami-drupal -> ../init.d/bitnami-drupal
 /etc/rc5.d/S80bitnami-drupal -> ../init.d/bitnami-drupal

And that’s it, the servers will be loaded at boot time. To revert the changes, just type

$ sudo update-rc.d -f bitnami-drupal remove
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值