安装jupyter
pip install jupyter
生成配置文件
jupyter notebook --generate-config
生成密码
In [1]: from notebook.auth import passwd
In [2]: passwd()
Enter password:
Verify password:
Out [2]: 'sha1:******************************'
修改配置文件
vi ~/.jupyter/jupyter_notebook_config.py
修改配置文件中下列信息,且将注释去掉
c.NotebookApp.ip='*'
c.NotebookApp.password = u'上面的密码'
c.NotebookApp.open_browser = False
c.NotebookApp.port =8888
启动jupyter
jupyter notebook
若在root用户下启动需加 --allow-root
若服务器有跳板机,客户端会显示服务器端拒绝连接,可在启动命令上加–ip 0.0.0.0