Ubuntu16.04安装配置jupyterhub
更新时间:2023-03-15 08:27: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安装配置jupyterhub03-15
请原谅我的不辞而别02-13
四川省成都七中2015届高三上学期第一次段考数学试卷(理科)09-23
思修调查报告组03-21
基层工会换届选举请示样式02-23
乘用车企业平均燃料消耗量核算办法09-14
2018-2019年整理纪念抗日战争胜利周世界反法西斯胜利周知识竞赛04-19
《牛津小学英语》五年级下学期口语测试要求06-11
张红岩托福《词以类记》PDF电子版04-21
数据结构习题集03-08
- exercise2
- 铅锌矿详查地质设计 - 图文
- 厨余垃圾、餐厨垃圾堆肥系统设计方案
- 陈明珠开题报告
- 化工原理精选例题
- 政府形象宣传册营销案例
- 小学一至三年级语文阅读专项练习题
- 2014.民诉 期末考试 复习题
- 巅峰智业 - 做好顶层设计对建设城市的重要意义
- (三起)冀教版三年级英语上册Unit4 Lesson24练习题及答案
- 2017年实心轮胎现状及发展趋势分析(目录)
- 基于GIS的农用地定级技术研究定稿
- 2017-2022年中国医疗保健市场调查与市场前景预测报告(目录) - 图文
- 作业
- OFDM技术仿真(MATLAB代码) - 图文
- Android工程师笔试题及答案
- 生命密码联合密码
- 空间地上权若干法律问题探究
- 江苏学业水平测试《机械基础》模拟试题
- 选课走班实施方案
- jupyterhub
- 配置
- 安装
- Ubuntu
- 16.04
- 数学思维训练一年级上册
- ANSYS梁单元如何提取应力
- 牛和鹅
- 高中语文专题22祭十二郎文试题(含解析)新人教版选修《中国古代诗歌散文欣赏》
- 曲靖市物业管理服务行业企业名录2018版524家 - 图文
- 数值分析(颜庆津)第三章 学习小结
- 毛邓三精选选择题(含答案)
- 中国建筑企业年金支付办法(分期支付、不调高标准)
- 有机化学综合测试题2(人卫版)
- 古代汉语(王宁版)书本课后题阅读译文
- 单片空间后方交会实习报告
- 电大专科基础会计试题及答案(2017)最新整理
- 电饼铛做各种饼 - 图文
- 北交14秋《计算机文化基础》在线作业二答案
- 三个代表学习笔记
- 东师《高等数学(一)》19春在线作业1
- 微电影《夏天》剧本
- 水工程规划同意书论证报告编制导则
- 茶艺师
- 成本会计期末练习题及答案