如何在后台Ubuntu 17.10中运行artisan命令

问题描述 投票:0回答:2

我正在尝试使用下面的putty和它的工作

php artisan horizon

但如果我关闭ssh(putty)这个命令会自动关闭。

我想在后台运行此命令。

ubuntu ubuntu-16.04 daemon digital-ocean daemons
2个回答
2
投票

您有一些选项可以在后台运行某些进程:

  1. 使用&:php artisan horizo​​n&
  2. 使用nohup:nohup php artisan horizo​​n(但你不需要这个选项)
  3. 使用systemctl:创建服务(但不需要此选项)

在你的情况下,第一个选项是最好的。


1
投票

在命令末尾尝试使用&来放置进程背景。

php artisan horizon &

© www.soinside.com 2019 - 2024. All rights reserved.