Centos7 搭建jupyter远程服务器

前提:已经安装好jupyter 和Ipython,个人安装anaconda自带jupyter和Ipython

步骤1:生成配置文件:

jupyter notebook --generate-config

生成完可以看到配置文件的存储位置

步骤2:生成密码

运行Ipython

In [1]: from notebook.auth import passwd 
In [2]: passwd() 
Enter password: 
Verify password: 
Out[2]:'sha1:ce23d945972*********63968a41f1140274’

步骤3:修改配置文件jupyter_notebook_config.py

c.NotebookApp.ip='*' # 就是设置所有ip皆可访问
c.NotebookApp.password = u'sha:ce...刚才复制的那个密文'
c.NotebookApp.open_browser = False # 禁止自动打开浏览器
c.NotebookApp.port =8888 #随便指定一个端口

步骤4:启动jupyter

nohup jupyter notebook  &  #nohup是用来防止退出shell关闭jupyter运行,&进行后台运行
原文地址:https://www.cnblogs.com/dj0325/p/8097477.html