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
c.NotebookApp.ip = ‘0.0.0.0‘
c.NotebookApp.port = 80 # 端口请随意,毕竟云笔记为个人笔记,端口隐蔽一些自己记住就好,注意
c.NotebookApp.notebook_dir = u‘/root/jupyter_dir‘
c.NotebookApp.open_browser = False
c.NotebookApp.password = u‘sha1:49f6ad7d17bxxxxxxxxxxxxxxxxe7ca8ba575f‘#此sha1从上步骤取得。
cat >>/root/jupyter_run.sh<<EOF
jupyter notebook --allow-root >> /opt/anaconda3/logs/jupyter_log.log 2>&1 &
echo "start jupyter"
EOF
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://blog.51cto.com/3487738/2285391