前提:已經安裝好jupyter 和Ipython,個人安裝anaconda自帶jupyter和Ipython
步驟1:生成配置文件:
jupyter notebook --generate-config
生成完可以看到配置文件的存儲位置
步驟2:生成密碼
運行Ipython
In [1]: from notebook.auth import passwd In [2]: passwd() Enter password: Verify password: Out[2]:'sha1:ce23d945972*********63968a41f1140274’
步驟3:修改配置文件jupyter_notebook_config.py
c.NotebookApp.ip='*' # 就是設置所有ip皆可訪問 c.NotebookApp.password = u'sha:ce...剛才復制的那個密文' c.NotebookApp.open_browser = False # 禁止自動打開瀏覽器 c.NotebookApp.port =8888 #隨便指定一個端口
步驟4:啟動jupyter
nohup jupyter notebook & #nohup是用來防止退出shell關閉jupyter運行,&進行后台運行