Centos7 搭建jupyter遠程服務器


前提:已經安裝好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運行,&進行后台運行

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM