jupyterhub 安装配置
安装
- 安装 anaconda3, 从https://www.anaconda.com/distribution/下载. 国内有代理,见这里 但不如官网新.
- 安装
sudo /opt/anaconda3/bin/pip install jupyterhub
- 参考github上jupyterhub的说明, 在/opt/nodejs 目录中安装
npm install configurable-http-proxy
配置
- 以下前两个配置更新为:
xyq@xyq-linux:~/.jupyter$ sed '/^#/d;/^$/d' /etc/jupyterhub/jupyterhub_config.py
c.JupyterHub.base_url = '/jupyter'
c.Authenticator.admin_users = set(['zkk','xyq'])
xyq@xyq-linux:~/.jupyter$ cat run_hub
#!/bin/bash
export PATH=/opt/anaconda3/bin:/opt/nodejs/node_modules/.bin:$PATH
cd /home/xyq/.jupyter
jupyterhub --config=/etc/jupyterhub/jupyterhub_config.py --port=8888 --no-ssl
- jupyterhub配置文件
sed '/^#/d;/^$/d' /etc/jupyterhub/jupyterhub.py
c.JupyterHub.port=8888
c.JupyterHub.proxy_cmd = ['/opt/nodejs/bin/configurable-http-proxy',]
c.Authenticator.admin_users =['zkk','xyq']
c.JupyterHub.base_url = '/jupyter'
- 启动脚本,注意添加路径
xyq@xyq-linux ~/.jupyter $ cat run_hub
#!/bin/bash
export PATH=/opt/anaconda3/bin:/usr/lib/rstudio-server/bin/pandoc:$PATH
cd /home/xyq/.jupyter
#nohup jupyterhub --config=/etc/jupyterhub/jupyterhub.py --no-ssl > run_hub.log 2>&1 &
jupyterhub --config=/etc/jupyterhub/jupyterhub.py --no-ssl
- 开机启动配置
sudo cat /etc/systemd/system/jupyterhub.service
[Unit]
Description=Jupyterhub
After=syslog.target network.target
[Service]
User=root
ExecStart=/home/xyq/.jupyter/run_hub
[Install]
WantedBy=multi-user.target
- 启动
sudo systemctl enable jupyterhub # 开机自启动
sudo systemctl daemon-reload # 加载配置文件
sudo systemctl start jupyterhub # 启动
sudo journalctl -u jupyterhub # 查看log
log操作, 更多命令
sudo journalctl --since yesterday -u jupyterhub
sudo journalctl --vacuum-size=1G
sudo journalctl --vacuum-time=1days
nginx 配置
sed '/ *#/d;/^$/d' /etc/nginx/sites-enabled/default
upstream ipython_server {
server 127.0.0.1:8888;
}
upstream r_server {
server 127.0.0.1:800;
}
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/html;
index index.html index.htm index.nginx-debian.html;
server_name _;
location / {
try_files $uri $uri/ =404;
}
location /jupyter/ {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_pass http://ipython_server;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
location /r/ {
rewrite ^/r/(.*)$ /$1 break;
proxy_pass http://127.0.0.1:800;
proxy_redirect http://127.0.0.1:800/ $scheme://$host/r/;
proxy_set_header X-Real-IP $remote_addr;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}
jupyterhub 安装配置的更多相关文章
- 实验室工作站jupyterhub安装笔记
本篇文章为实验室工作站的jupyterhub安装配置笔记,由于软硬件等各种区别,安装过程难免有所区别,仅供大家参考. 实验室新到一台深度学习工作站,原本想装一个juoyter notebook直接开干 ...
- Hive安装配置指北(含Hive Metastore详解)
个人主页: http://www.linbingdong.com 本文介绍Hive安装配置的整个过程,包括MySQL.Hive及Metastore的安装配置,并分析了Metastore三种配置方式的区 ...
- Hive on Spark安装配置详解(都是坑啊)
个人主页:http://www.linbingdong.com 简书地址:http://www.jianshu.com/p/a7f75b868568 简介 本文主要记录如何安装配置Hive on Sp ...
- ADFS3.0与SharePoint2013安装配置(原创)
现在越来越多的企业使用ADFS作为单点登录,我希望今天的内容能帮助大家了解如何配置ADFS和SharePoint 2013.安装配置SharePoint2013这块就不做具体描述了,今天主要讲一下怎么 ...
- Hadoop的学习--安装配置与使用
安装配置 系统:Ubuntu14.04 java:1.7.0_75 相关资料 官网 下载地址 官网文档 安装 我们需要关闭掉防火墙,命令如下: sudo ufw disable 下载2.6.5的版本, ...
- redis的安装配置
主要讲下redis的安装配置,以及以服务的方式启动redis 1.下载最新版本的redis-3.0.7 到http://redis.io/download中下载最新版的redis-3.0.7 下载后 ...
- Windows环境下的NodeJS+NPM+Bower安装配置
npm作为一个NodeJS的模块管理,之前我由于没有系统地看资料所以导致安装配置模块的时候走了一大段弯路,所以现在很有必要列出来记录下.我们要先配置npm的全局模块的存放路径以及cache的路径,例如 ...
- ubuntu kylin 14.04安装配置MongoDB v2.6.1(转)
1.获取最新版本 https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-2.6.1.tgz 2.解压并进入bin目录 tar zxvf mongo ...
- Django基础之安装配置
安装配置 一 MVC和MTV模式 著名的MVC模式:所谓MVC就是把web应用分为模型(M),控制器(C),视图(V)三层:他们之间以一种插件似的,松耦合的方式连接在一起. 模型负责业务对象与数据库的 ...
随机推荐
- 17 ~ express ~ 分类的显示 ,修改 和 删除
一,前台显示 /views/admin/category.html {% extends 'layout.html' %} {% block main %} <ol class="br ...
- Python之日志处理(logging模块)转载
本人主要做一个知识的归类与记录,如是转载类文章,居首都会备注原链接,尊重原创者,谢谢! 此文转载原链接:https://www.cnblogs.com/yyds/p/6901864.html 本节内容 ...
- C# Socket编程入门
一直没有触及到这一块儿,学习下 在看一个小demo https://www.cnblogs.com/yy3b2007com/p/7476458.html
- Codeforces 444C 线段树 懒惰标记
前天晚上的CF比赛div2的E题,很明显一个线段树,当时还在犹豫复杂度的问题,因为他是区间修改和区间查询,肯定是要用到懒惰标记. 然后昨天真的是给这道题跪了,写了好久好久,...我本来是写了个add标 ...
- bugku-杂项 听首音乐
下载文件,是个wav文件,用Audacity打开,发现有 放大后记录下来:(每一组后面加上空格) ..... -... -.-. ----. ..--- ..... -.... ....- ----. ...
- Hour of Code|京东云邀您一起,“码”上行动
"如果我并不希望成为一名程序员,那么为什么需要学习编程呢?" 相信很多人对于现在鼓励从小就学习编程的趋势都在心里问过这样的一个问题.在回答这个问题前,先和大家分享一个小故事吧. 1 ...
- CF1217B Zmei Gorynich
You are fighting with Zmei Gorynich — a ferocious monster from Slavic myths, a huge dragon-like rept ...
- java伪代码 (第一章)
在<大道至简>第一章中,周爱民先生引用一则<愚公移山>的寓言,引出了编程的根本:顺序.选择.循环.汤问篇中所述的愚公移山这一事件,我们看到了原始需求的产生---“惩山北之塞,出 ...
- PAT Advanced 1018 Public Bike Management (30) [Dijkstra算法 + DFS]
题目 There is a public bike service in Hangzhou City which provides great convenience to the tourists ...
- POJ 1502:MPI Maelstrom Dijkstra模板题
MPI Maelstrom Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 6499 Accepted: 4036 Des ...