- 安装jupyter
- 生成配置文件
jupyter notebook --generate-config --allow-root
配置文件的位置在:
~/.jupyter/jupyter_notebook_config.py
- 生成用于登录 的密码
jupyter notebook password
- 修改配置文件
修改ip, 默认为localhost:
sed -ie "s/#c.NotebookApp.ip = 'localhost'/c.NotebookApp.ip = '0.0.0.0'/g" ~/.jupyter/jupyter_notebook_config.py
- 修改port, 默认为8888:
sed -ie 's/#c.NotebookApp.port = 8888/c.NotebookApp.port = 9999/g' ~/.jupyter/jupyter_notebook_config.py
- 后台启动Jupyter
nohup jupyter notebook --allow-root > jupyter.log 2>&1 &
- 浏览器访问:
- 打开浏览器,输入 Jupyter服务器的ip:8000
- 进入登陆页面后,输入刚刚设置的密码即可
网友评论