Ipython Notebook升级版Jupyter Notebook远程服务器配置
2016-07-17 04:28
441 查看
注:所有的这些操作都是在远程服务器端配置好。
1. 登陆远程服务器
2. 生成配置文件
<code class="hljs lasso has-numbering"><span class="hljs-variable">$jupyter</span> notebook <span class="hljs-subst">--</span>generate<span class="hljs-attribute">-config</span></code>
3. 生成密码
打开ipython,创建一个密文的密码:
<code class="language-ipython hljs mathematica has-numbering"><span class="hljs-keyword">In</span> [<span class="hljs-number">1</span>]: from notebook.auth import passwd <span class="hljs-keyword">In</span> [<span class="hljs-number">2</span>]: passwd() <span class="hljs-keyword">Enter</span> password: Verify password: <span class="hljs-keyword">Out</span>[<span class="hljs-number">2</span>]: <span class="hljs-string">'sha1:ce23d945972f:34769685a7ccd3d08c84a18c63968a41f1140274'</span></code>把生成的密文‘sha:ce…’复制下来,后面要用到这个hash code
密码是访问Jupyter远程服务器要用到
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
最后启动服务器:
ipython notebook --profile=nbserver
因为是自制的证书,所以需要将访问的页面设置为信任例外
最后附上成功后的浏览器界面
相关文章推荐
- python中多线程中GIL的介绍
- Python打印print函数深入解析
- python 实现 knn分类算法 (Iris 数据集)
- python内置函数 2
- 配置python tab键自动补全
- 【转】开篇python--明白python文件如何组织,理解建立源文件
- Python读取文件
- Learning Python 008 正则表达式-003 sub()方法
- Python入门笔记之字符串
- 如何在 Python 3.4 上安装 python-docx
- Learning Python 008 正则表达式-004 sub()方法
- python 关于多线程那些事
- 怎么样才算是精通 Python?
- Learning Python 008 正则表达式-003 search()方法
- Learning Python 008 正则表达式-003 search()方法
- Python序列——元组
- 最简洁最没有废话的python入门教程
- Python if..else
- python网络画图——networkX
- Learning Python 008 正则表达式-002 findall()方法