我的make发球命令运行我的jupyter-book和make发球。
codio@anita-doctor:~/workspace/Introduction-to-Data-Science/IntroBook$ make serve
bundle exec guard
Configuration file: _config.yml
15:21:53 - INFO - Jekyll building...
15:21:54 - INFO - Jekyll build completed in 0.75s /home/codio/workspace/Introduction-to-Data-
Science/IntroBook → _site
15:21:54 - INFO - Jekyll watching and serving using jekyll at 0.0.0.0:4000/jupyter-book
15:21:54 - INFO - Jekyll watching
15:21:54 - INFO - LiveReload is waiting for a browser to connect.
15:21:54 - INFO - Guard is now watching at '/home/codio/workspace/Introduction-to-Data-
Science/IntroBook'
Server address: http://0.0.0.0:4000/jupyter-book/
Server running... press ctrl-c to stop.
/home/codio/anaconda/lib/ruby/gems/2.6.0/gems/guard-2.14.2/lib/guard/jobs/pry_wrapper.rb:279:
warning: method Pry#input_array is deprecated. Use Pry#inp
ut_ring instead
[1] guard(main)>所以我尝试使用nohup命令在后台运行它。
codio@anita-doctor:~/workspace/Introduction-to-Data-Science/IntroBook$ nohup make serve >/dev/null
2>&1 &
[2] 2135
[1] Done nohup make serve < /dev/null > /dev/null 2>&1这种命令或命令类型通常什么也不做。我想我可能很亲近。但是,nohup命令似乎不允许ruby 'make‘命令工作。我的目标是托管服务器,就像我在后台使用ubuntu框中的make命令所做的第一行代码所做的那样。任何帮助都将不胜感激。
发布于 2019-11-19 15:50:10
我发现这可能有点问题。最好是将服务器设置为服务(如mysqld、sshd等)。或者用"at“来启动它。如果命令在前台运行时有效(没有nohup),那么使用"at“运行它就可以了,因为它将当前环境应用于命令,并将"atd”作为父进程在注销时不会消失(有时在尝试重新分配父进程时会中断nohup ):
at now
at> make serve >>/var/log/rubyserver.log 2>&1
at> ^Dhttps://stackoverflow.com/questions/58937683
复制相似问题