服務(wù)器端設(shè)置
#安裝
conda install jupyter notebook
#生成配置文件
jupyter notebook --generate-config
制作密碼的哈希算法字符串
ipython
#進(jìn)入交互python
from jupyter_server.auth import passwd
#sha1不需要修改,這是哈希算法名稱
passwd(algorithm='sha1')
#設(shè)置密碼
#輸出
sha1:029e709378b8:88saf735af68888fhjsdfgfefefac008
#退出
quit()
修改配置文件
vim ~/.jupyter/jupyter_notebook_config.py
c.ServerApp.open_brower = False
c.ServerApp.ip = '*' #保持*就可以
c.ServerApp.password = u'sha1:029e709378b8:88saf735af68888fhjsdfgfefefac008' #密碼設(shè)置
c.ServerApp.port = 8888
c.ServerApp.root_dir = '/lab/data/project' #工作目錄
用戶電腦上,在瀏覽器中輸入服務(wù)器IP地址:端口號,比如192.168.1.156:8888/就可以進(jìn)入jupyter