如何在启动时启动ipython笔记本服务器作为守护进程 [英] How to start ipython notebook server at boot as daemon
本文介绍了如何在启动时启动ipython笔记本服务器作为守护进程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我喜欢ipython,特别是笔记本电脑的功能。我目前正在使用笔记本进程运行一个屏幕会话。如何将ipython的笔记本引擎/网络服务器添加到我的系统(CentOS5)启动程序中?
I love ipython, especially the notebook feature. I currently keep a screen session running with the notebook process in it. How would I add ipython's notebook engine/webserver to my system's (CentOS5) startup procedures?
推荐答案
vi /usr/lib/systemd/system/ipython-notebook.service
#put the following in there.
-----------------8<------------------
[Unit]
Description=IPython notebook
[Service]
Type=simple
PIDFile=/var/run/ipython-notebook.pid
ExecStart=/usr/bin/ipython notebook --no-browser
User=ipynb
Group=ipynb
WorkingDirectory=/home/ipynb/notebooks
[Install]
WantedBy=multi-user.target
-----------------8<------------------
# useradd ipynb
# su - ipynb # go there create notebooks dir
# systemctl daemon-reload
# systemctl enable ipython-notebook
# systemctl start ipython-notebook
这篇关于如何在启动时启动ipython笔记本服务器作为守护进程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文