1.terminal 敲擊 pip3 install jupyter
2.terminal 敲擊 jupyter notebook --generate-config
3.terminal 敲擊 python3
python命令行里敲擊
from notebook.auth import passwd
passwd(), 然后會生成秘鑰
4.terminal 敲擊 vim ~/.jupyter/jupyter_notebook_config.py(該文件生成的路徑)
c.NotebookApp.ip='*' # 設置所有ip皆可訪問 c.NotebookApp.password = u'' # 復制生成的秘鑰 c.NotebookApp.open_browser = False # 禁止自動打開瀏覽器 c.NotebookApp.port = 8888 # 指定8888端口 c.NotebookApp.allow_remote_access = True
5.terminal 敲擊 jupyter notebook,然后本地可以通過服務器的ip + :8888即可遠程訪問