1. 下载安装python 3.6
yum install sqlite-devel openssl-devel
wget https://www.python.org/ftp/python/3.6.5/Python-3.6.5.tgz
tar zxvf Python-3.6.5.tgz
cd Python-3.6.5
./configure
make install
2. 安装nodejs
cd /usr/local/src/
wget http://nodejs.org/dist/v0.10.24/node-v0.10.24.tar.gz
tar zxvf node-v0.10.24.tar.gz
cd node-v0.10.24
./configure --prefix=/usr/local/node/0.10.24
make
make install
修改/etc/profile
vim /etc/profile
增加nodejs的环境变量
export NODE_HOME=/usr/local/node/0.10.24
export PATH=$NODE_HOME/bin:$PATH
之后执行
source /etc/profile
之后安装代理:
npm install -g configurable-http-proxy
3. 安装notebook:
pip3 install jupyterhub
pip3 install ipython notebook
ipython3 kernelspec install-self
pip3 install findspark
pip3 install --upgrade --force-reinstall --no-cache-dir jupyter
安装toree
pip3 install https://dist.apache.org/repos/dist/dev/incubator/toree/0.2.0-incubating-rc3/toree-pip/toree-0.2.0.tar.gz
jupyter toree install --spark_home=/usr/hdp/2.6.0.3-8/spark2
安装pyspark
pip3 install pyspark
4. 执行jupyterhub启动程序
Pyspark脚本需要加入:
import findspark
findspark.init()