阿里云ECS搭建Jupyter Notebook(下)


4. 生成密码密文
root@iZuf6e9bjg74ll9e9hcyagZ:~/anaconda# ipython
Python 3.6.5 |Anaconda, Inc.| (default, Apr 29 2018, 16:28:17) 
Type 'copyright', 'credits' or 'license' for more information
IPython 6.4.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: from notebook.auth import passwd

In [2]: passwd()
Enter password: 
Verify password: 
Out[2]: 'sha1:ebfc56bf554a:75306bbb99826373ff0b2e0f6c53ae21e61bf450'

In [3]: exit()
5. 配置Jupyter
root@iZuf6e9bjg74ll9e9hcyagZ:~/anaconda# jupyter notebook --allow-root --generate-config
Writing default config to: /root/.jupyter/jupyter_notebook_config.py
root@iZuf6e9bjg74ll9e9hcyagZ:~/anaconda# vi /root/.jupyter/jupyter_notebook_config.py
6. jupyter_notebook_config.py配置
## The directory to use for notebooks and kernels.
c.NotebookApp.notebook_dir = '/root/jupyterworkspace'
## Hashed password to use for web authentication.
#  
#  To generate, type in a python/IPython shell:
#  
#    from notebook.auth import passwd; passwd()
#  
#  The string should be of the form type:salt:hashed-password.
c.NotebookApp.password = 'sha1:ebfc56bf554a:75306bbb99826373ff0b2e0f6c53ae21e61bf450'
## The port the notebook server will listen on.
c.NotebookApp.port = 8888
## The IP address the notebook server will listen on.
c.NotebookApp.ip = '*'
7. 后台启动Jupyter
root@iZuf6e9bjg74ll9e9hcyagZ:~/anaconda# nohup jupyter notebook



  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值