pip install toree
pip install notebook
pip install jupyter
yum install gcc libffi-devel python-devel openssl-devel
jupyter toree install --spark_home=/opt/spark/ --spark_opts='--driver-memory 8g --executor-cores 4 --executor-memory 12g --total-executor-cores 20 --jars /opt/hive/lib/mysql-connector-java-5.1.35-bin.jar'
SPARK_OPTS='--name "weiwenda" --driver-memory 4g --executor-cores 2 --executor-memory 8g --total-executor-cores 10 --jars /opt/hive/lib/mysql-connector-java-5.1.35-bin.jar' jupyter notebook
jupyter notebook --generate-config
vim /root/.jupyter/jupyter_notebook_config.py
添加以下内容:
c.NotebookApp.allow_origin = '*'
c.NotebookApp.notebook_dir = u'/root/Documents'
c.NotebookApp.open_browser = False
c.NotebookApp.port = 8888
c.NotebookApp.token = u''
c.NotebookApp.ip = '202.117.16.188'
jupyter notebook
#查看当前screen窗口
screen -ls
#创建新的screen窗口
screen -S screen_name
#detach某个screen窗口
screen -d screen_name
ctrl+a -> d #detach当前
#return某个screen窗口
screen -r screen_name
#杀死当前screen窗口
ctrl+a -> k
%AddJar file:///root/Documents/wwd/Find_IL_EdgeResultAnalysis.jar
https://toree.incubator.apache.org/documentation/user/quick-start