一、生成jupyter的配置文件
jupyter notebook - - generate- config
/ home/ usrname/ . jupyter/ jupyter_notebook_config. py
二、生成密钥
In [ 1 ] : from notebook. auth import passwd
In [ 2 ] : passwd( )
Enter password: 123
Verify password: 123
Out[ 2 ] : 'sha1:8361f5f08937:081cdf40730cb5548e2c213ddd36813a5313192f'
三、修改配置文件
vim ~ / . jupyter/ jupyter_notebook_config. py
c. NotebookApp. notebook_dir = '/Data/'
c. NotebookApp. allow_root = True
c. NotebookApp. ip = '172.*.*.168'
c. NotebookApp. open_browser = False
c. NotebookApp. password = u'sha1:a800c84026a2:1e*****2d1ceec0dd4dac452a164ceb'
c. NotebookApp. port = 8888
四、打开配置文件中设定的端口号
firewall- cmd - - zone= public - - add- port= 8888 / tcp - - permanent
sudo systemctl restart firewalld
五、开启jupyter后端运行
nohup jupyter notebook - - allow- root
六、浏览器访问jupyter
172 . * . * .168 : 8888