Centos7 搭建 Jupyter + Nginx 服务

Jupyter Notebook(此前被称为 IPython notebook)是一个交互式笔记本,支持运行 40 多种编程语言。
Jupyter Notebook 的本质是一个 Web 应用程序,便于创建和共享文学化程序文档,支持实时代码,数学方程,可视化和 markdown。 用途包括:数据清理和转换,数值模拟,统计建模,机器学习等等。

本文讲述如何搭建Jupyter+Nginx服务,仅供学习与交流,请勿用于商业用途

一,搭建jupyter

系统环境 Centos7

安装python3及pip

yum install -y python3 python3-pip*

安装jupyter

pip3 install jupyter

生成jupyter配置文件

jupyter notebook --generate-config
Writing default config to: /root/.jupyter/jupyter_notebook_config.py

修改配置 配置文件在~/.jupyter/jupyter_notebook_config.py

# 允许远程访问
c.NotebookApp.allow_remote_access = True  
# 同意root用户启动
c.NotebookApp.allow_root = False
# 设置jupyter的资源主页路径,即[jupyter主页]  
c.NotebookApp.base_url = '/jupyter'  
##监听本地
c.NotebookApp.ip = '0.0

你可能感兴趣的:(python,nginx,linux,centos)