centos7 配置安装 jupyterhub

环境:  centos7

1 安装 node.js 略

2 安装 anaconda python3.7 略


pip install theano

 pip install jupyterhub

npm install -g configurable-http-proxy


3 创建 .jupyterhub目录

 4 jupyterhub --generate-config 生成配置文件

c.JupyterHub.ip ='0.0.0.0

c.JupyterHub.port = 9010

c.PAMAuthenticator.encoding = 'utf8'

c.LocalAuthenticator.create_system_users = True

c.Authenticator.whitelist = {'jptest1','jptest2','jptest3'}

c.Authenticator.admin_users = {'jpadmin'}

#c.Spawner.cmd=['jupyterhub-singleuser']

c.JupyterHub.statsd_prefix = 'jupyterhub'

5 shell终端

sudo groupadd jupyterhub

sudo useradd -g jupyterhub jpadmin 

(

useradd -c "用户注释" -g jupyterhub -d /home/用户目录 -s /bin/bash 用户名

这个是目前有效的方案,jupyterhub服务需以jupyterhub用户启动,否则无法获取PAM授权

)

sudo passwd jpadmin

 jupyterhub --no-ssl

 jupyterhub --ssl-key server_nopwd.key --ssl-cert server.crt

启动成功,这时候可以用系统用户登录了。

你可能感兴趣的:(centos7 配置安装 jupyterhub)