大家讲道理2017-04-18 09:25:22
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
PHPz2017-04-18 09:25:22
$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
黄舟2017-04-18 09:25:22
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