python - securecrt关闭时候如何能保持服务器上的两个服务持续运行下去?
迷茫
迷茫 2017-04-18 09:23:22
0
5
474
迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

reply all(5)
大家讲道理

It is recommended to use tmux (Linux terminal reuse software), the solution is as follows: (CentOS machine)

yum install tmux -y //安装软件
tmux //启动新终端
cd xxx //cd到你的脚本目录
python server.py//

The script is already running at this time. Even if the shell terminal is closed, the program is still running, because the direct terminal that starts the program is tmux, not your securecrt.
If you want to check the process status, reopen securecrt and execute

tmux attach

tmux detailed documentation
documentation

刘奇

One process management supervisord is all it takes

PHPzhong

$nohup your_service &
Convert to background operation, ignore stderr, stdout is transferred to nohup.out. It will continue even if you exit the terminal.

Or search how to register a linux service so that it can be managed with
$service xxx start

黄舟

The methods mentioned above can be used. I'm talking about one that uses screen. For example:

screen -S xyz (Choose a memorable name)
xxxx (your command)
ctrl+a+d
Then just exit.
After logging in next time, execute:

screen -r xyz
You can return to the last interface you exited

Peter_Zhu

System V initsupervisord未来都是systemd dishes

^_^

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!