Ubuntu16.04安装配置jupyterhub
更新时间:2024-07-12 14:00:01 阅读量: 综合文库 文档下载
Ubuntu16.04安装配置jupyterhub
1 Anconda3安装 1.1 下载
国内代理:https://mirror.tuna.tsinghua.edu.cn/help/anaconda/
在https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/下载对应版本,此处为: Anaconda3-4.3.1-Linux-x86_64.sh
下载位置在根目录:~/ Anaconda3-4.3.1-Linux-x86_64.sh
1.2 安装
对应目录下执行:bashAnaconda3-4.3.1-Linux-x86_64.sh
接受协议
同意协议:yes
添加路径:yes,此处路径默认为:/root/.bashrc 立即生效:source/root/.bashrc
1.3 测试安装
通过命令:conda –version
1.4 补充说明
默认安装了anaconda3,并使路径生效后,python版本为3.6.0
因此此处pip默认为pip3,Ubuntu16.04自带的python版本为2.7
2 安装依赖包 2.1 npm/nodejs
命令:apt-get install npm nodejs-legacy
验证: node-v npm –v
PS:若apt源为aliyun源(如阿里云的ECS服务器中的Ubuntu),会提示找不到包,此处提供的解决办法是通过修改apt源 修改apt源为默认Ubuntu源 查看源
命令:cat /etc/apt/sources.list
若出现deb http://us.archive.ubuntu.com/ubuntu/,则说明源为Ubuntu系统默认的源 若未出现且提示安装包找不到,继续下一步 修改源
首先进入相应目录:cd /etc/apt/
备份原文件,命令:cpsources.listsources.list.bak
清空原文件内容,然后插入以下内容
#deb cdrom:[Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)]/ xenial main restricted # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to # newer versions of the distribution. deb http://us.archive.ubuntu.com/ubuntu/ xenial main restricted # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial main restricted ## Major bug fix updates produced after the final release of the ## distribution. deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team, and may not be under a free licence. Please satisfy yourself as to ## your rights to use the software. Also, please note that software in ## universe WILL NOT receive any review or updates from the Ubuntu security ## team. deb http://us.archive.ubuntu.com/ubuntu/ xenial universe # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial universe deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates universe # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates universe ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team, and may not be under a free licence. Please satisfy yourself as to ## your rights to use the software. Also, please note that software in ## multiverse WILL NOT receive any review or updates from the Ubuntu ## security team. deb http://us.archive.ubuntu.com/ubuntu/ xenial multiverse # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial multiverse deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates multiverse # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates multiverse ## N.B. software from this repository may not have been tested as ## extensively as that contained in the main release, although it includes ## newer versions of some applications which may provide useful features. ## Also, please note that software in backports WILL NOT receive any review ## or updates from the Ubuntu security team. deb http://us.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse ## Uncomment the following two lines to add software from Canonical's ## 'partner' repository. ## This software is not part of Ubuntu, but is offered by Canonical and the ## respective vendors as a service to Ubuntu users. # deb http://archive.canonical.com/ubuntu xenial partner # deb-src http://archive.canonical.com/ubuntu xenial partner deb http://security.ubuntu.com/ubuntu xenial-security main restricted # deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted deb http://security.ubuntu.com/ubuntu xenial-security universe # deb-src http://security.ubuntu.com/ubuntu xenial-security universe deb http://security.ubuntu.com/ubuntu xenial-security multiverse # deb-src http://security.ubuntu.com/ubuntu xenial-security multiverse
保存后通过
刷新:①apt-get update;②apt-get upgrade
2.2 proxy
命令:npm install -g configurable-http-proxy 验证:configurable-http-proxy –version
PS:国内存在npm可能被墙,修改npm镜像为淘宝NPM镜像 命令:npm install -g cnpm --registry=https://registry.npm.taobao.org 同步:cnpm sync connect
之后利用cnpm代替npm安装proxy,命令如下: cnpm install -g configurable-http-proxy
3 jupyterhub安装 3.1 jupyterhub
命令:pip install jupyterhub 验证:jupyterhub –V
3.2 notebook
安装好jupyterhub后,notebook一般是同步安装了,此处做一下更新。 命令:pip install --upgrade notebook
3.3 验证访问
开启服务:jupyterhub --no-ssl
本机访问:http://127.0.0.1:8000 外网访问:http://your_ip:8000
PS:如果不能访问,关闭防火墙试试
4 jupyterhub配置 4.1 安全访问配置
命令:openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout mykey.key -out mycert.pem 验证:通过ls,查看是否生成mykey.key和mycert.pem文件
4.2 Github OAuthentication
创建Oauth application
your Github profile > Settings > Oauth application Authorization callback URL
https://your_host/hub/oauth_callback
自动生成Client ID、Client Secret
4.3 jupyterhub_config
生成配置文件,命令:jupyterhub --generate-config
4.3.1 OAuthenticator
安装:pip install oauthenticator
出现Requirement already satisfied,表示成功。
4.3.2 用户配置
创建userlist文件:vim userlist 添加内容
GitHub_profile_name1admin GitHub_profile_name2admin GitHub_profile_name3 将用户添加到系统中,命令:adduser GitHub_profile_name1 按需添加用户
4.3.3 修改配置文件
在jupyterhub_config文件末尾添加以下内容: #---------------------------------------------------------------------------------------------------- # Application configuration #-------------------------------------------------------------------------------------------------------- # This is an application. c.JupyterHub.authenticator_class = 'oauthenticator.GitHubOAuthenticator' c.GitHubOAuthenticator.oauth_callback_url = 'https://your_ip_addrees/hub/oauth_callback' c.GitHubOAuthenticator.client_id = 'Github_OAuth_application_Client ID' c.GitHubOAuthenticator.client_secret = 'Github_OAuth_application_Client Secret ' # This is an application. # create system users that don't exist yet c.LocalAuthenticator.create_system_users = True c.Authenticator.whitelist = {'name1', 'name2', 'name3'} c.Authenticator.admin_users = {'name1', 'name2'} c.Spawner.notebook_dir = '/home/name1/notebooks' c.JupyterHub.ssl_cert = 'mycert.pem' c.JupyterHub.ssl_key = 'mykey.key' 4.4 验证访问
命令:jupyterhub
正在阅读:
Ubuntu16.04安装配置jupyterhub07-12
2014中考试题汇编 - 认识新自我01-21
2013年秋七年级第一次月考历史试题05-10
保健食品GMP文件目录(全)10-10
调皮的雾作文400字06-27
2017重庆法检考试面试:面试中如何应对表达障碍 - 图文03-11
2021年语文版三年级语文下册一单元综合能力测考试卷及答案06-10
中级维修电工模拟试题08-23
毕业班物理复习课的教学反思04-22
- 多层物业服务方案
- (审判实务)习惯法与少数民族地区民间纠纷解决问题(孙 潋)
- 人教版新课标六年级下册语文全册教案
- 词语打卡
- photoshop实习报告
- 钢结构设计原理综合测试2
- 2014年期末练习题
- 高中数学中的逆向思维解题方法探讨
- 名师原创 全国通用2014-2015学年高二寒假作业 政治(一)Word版
- 北航《建筑结构检测鉴定与加固》在线作业三
- XX县卫生监督所工程建设项目可行性研究报告
- 小学四年级观察作文经典评语
- 浅谈110KV变电站电气一次设计-程泉焱(1)
- 安全员考试题库
- 国家电网公司变电运维管理规定(试行)
- 义务教育课程标准稿征求意见提纲
- 教学秘书面试技巧
- 钢结构工程施工组织设计
- 水利工程概论论文
- 09届九年级数学第四次模拟试卷
- jupyterhub
- 配置
- 安装
- Ubuntu
- 16.04
- 热工测量及仪表思考题部分答案
- 高考政治主观题答题思路与模式
- 模拟电子基础试卷2及答案
- 毕业论文 - 图文
- 信息学2014年第六题安装饮水机
- FDA发布咀嚼片关键质量属性指导原则
- 建筑工程管理课程设计
- 英美文学中过的哥特传统 - 图文
- 广西柳州市2016年中考数学试卷(解析版)
- icem一些总结
- 发挥党校政治优势 推进干部教育创新
- 缅甸加速开发能源以满足日益高涨的需求
- 关于大学生销售的寒假社会实践报告
- 升旗仪式演讲稿
- 电子科技大学中山学院学生学籍学历电子注册实施细则
- 九年级数学下册1.4解直角三角形重难点突破素材(新版)北师大版
- 宋楼中心校关于举办安全教育手抄报比赛的通知
- 街道党工委书记在全县低丘缓坡开发征迁动员大会上的表态发言
- XXXX老年康复中心可行性研究报告(内容详细数据全面格式完整-可
- 2018-2019学年度苏教版小学六年级数学下册全册教案