(本操作手册默认已安装Python环境)
服务器端:
1、安装jupyter(import jupyter即可检验)
pip install jupyter
2、生成jupyter notebook配置文件
jupyter notebook --generate-config
(即可生成.jupyter/jupyter_notebook_config.py配置文件)
3、生成jupyter登录密码
4、修改jupyter配置文件
修改~/.jupyter/jupyter_notebook_config.py文件内容,去掉原有文件的注释,修改对应的内容并保存。
c.NotebookApp.ip='*' #设置所有ip地址皆可访问
c.NotebookApp.password=u'shal:...' #复制粘贴第3步生成的秘钥
c.NotebookApp.open_browser=False #禁止自动打开浏览器
c.NotebookApp.port=8888 #指定浏览器连接远程服务器的端口
5、在服务器的终端terminal中执行"nohup jupyter notebook &"
本地电脑端:
在本地浏览器中输入<服务器ip地址>:8888,之后输入登录密码即可以成功访问。
注:要在你想访问的文件夹中打开jupyter notebook,此时即可成功在本地浏览器使用服务器的jupyter notebook。
参考:
https://www.cnblogs.com/qiangzi0221/p/8933722.html
https://www.jb51.net/article/140781.htm