【搭建个人云笔记】Jupyter在linux部署安装过程文档
其他
2018-09-25 17:06:55
阅读次数: 0
序号 |
修改人 |
版本 |
时间 |
备注 |
1. |
Minggle |
v1.0 |
2018.8.23 |
新建 |
- 部署环境
- 系统环境
- CentOS Linux release 7.5.1804
- 依赖包
- Compatibility libraries
- Debugging Tools
- Development tools
- 安装所需依赖软件
yum -y install wget bzip2`
- 获取安装包并安装
cd /usr/local/src/
wget https://repo.anaconda.com/archive/Anaconda3-5.2.0-Linux-x86_64.sh
chmod +x Anaconda3-5.2.0-Linux-x86_64.sh
sh Anaconda3-5.2.0-Linux-x86_64.sh #安装目录可修改(修改为/opt/anaconda3),环境变量选择写入~/.bashrc
- 使环境变量生效
source ~/.bashrc
- 安装运行插件
pip install msgpack
conda install -c anaconda msgpack-python
pip install jupyter_contrib_nbextensions
jupyter contrib nbextension install --user
- 设置密码
ipython
In [1]: from notebook.auth import passwd
In [2]: passwd() #密码sha1需要copy下来,下面配置需要用到
- 编辑配置文件
jupyter notebook --generate-config --allow-root #root方式查看配置文件路径
vim /root/.jupyter/jupyter_notebook_config.py
- 编写启动脚本
cat >>/root/jupyter_run.sh<<EOF
jupyter notebook --allow-root >> /opt/anaconda3/logs/jupyter_log.log 2>&1 &
echo "start jupyter"
EOF
- 创建log目录及添加运行权限
mkdir -p /opt/anaconda3/logs
cd ~ && chmod u+x jupyter_run.sh && mkdir jupyter_dir
sh jupyter_run.sh
- 放行防火墙相关端口
firewall-cmd --zone=public --add-port=80/tcp --permanent # 放行服务端口
firewall-cmd --reload
- 外网访问测试
![【搭建个人云笔记】Jupyter在linux部署安装过程文档](http://i2.51cto.com/images/blog/201809/25/dca34ade5659f3c2b23495e3f6dc0f65.png?x-oss-process=image/watermark,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_90,type_ZmFuZ3poZW5naGVpdGk=)
转载自blog.51cto.com/3487738/2285391