安装
centos端
# 安装
conda install -y jupyter notebook
# 初始化配置
jupyter notebook --generate-config
vim ~/.jupyter/jupyter_notebook_config.py
修改配置
c.NotebookApp.ip = '0.0.0.0'
c.NotebookApp.open_browser = False
c.NotebookApp.notebook_dir = '/home/alvin/file'
# 启动
nohup jupyter notebook > ~/jupyter.out &
--port <port_number> 默认从8888开始
使用
第一次打开会要求输入token和初始化密码,很简单,如下:
➜ ~ tail ~/jupyter.out
To access the notebook, open this file in a browser:
file:///run/user/1000/jupyter/nbserver-8740-open.html
Or copy and paste one of these URLs:
http://iZ2ze1m0zmp2di7u8cb4kcZ:8888/?token=69061d7cf2d1a98466491659fffcde21a842d209ae399fa5
or http://127.0.0.1:8888/?token=69061d7cf2d1a98466491659fffcde21a842d209ae399fa5
[I 15:37:23.831 NotebookApp] 302 GET / (106.37.179.179) 0.67ms
[I 15:37:23.851 NotebookApp] 302 GET /tree? (106.37.179.179) 0.80ms
[W 15:37:36.540 NotebookApp] 401 POST /login?next=%2Ftree%3F (106.37.179.179) 2.32ms referer=http://www.tianyunperfect.cn:8888/login?next=%2Ftree%3F
[W 15:38:06.128 NotebookApp] 404 GET /static/auth/js/main.min.js.map (106.37.179.179) 9.40ms referer=None
主界面: