首先要生成密码,打开python终端。

In [1]: from IPython.lib import passwd

In [2]: passwd()
Enter password:
Verify password:
Out[2]: 'sha1:0e422dfccef2:84cfbcb
b3ef95872fb8e23be3999c123f862d856'
接下来生成秘钥:

openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout mycert.pem -out mycert.pem
创建一个服务器配置:

ipython profile create nbserver
编辑文件jupyter_notebook_config.py,在~/.jupyter/文件夹里,

c.NotebookApp.password = u'sha1:。。。。。。。。。。。'
c.NotebookApp.certfile = u'/root/.jupyter/mycert.pem'
c.NotebookApp.ip = '*'
c.NotebookApp.port = 9999
最后启动服务器:

python3 -m jupyter notebook

相关文章:

  • 2022-02-01
  • 2021-11-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-26
  • 2021-09-01
  • 2022-12-23
猜你喜欢
  • 2021-11-04
  • 2022-12-23
  • 2021-12-10
  • 2021-08-14
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案