- 第一步,服务器安装jupyter
pip install jupyter - 第二部:生成配置文件
jupyter notebook --generate-config - 第三部,进入python,生成密码
![在这里插入图片描述](https://img-blog.csdnimg.cn/57040ec4091a43ec80a97bc160ea036e.png) sha1:364e7540ff84:f13729de68ab717bb352b3451f346a268e7e3c2b - 第四步,修改文件:nano .jupyter/jupyter_notebook_config.py
![在这里插入图片描述](https://img-blog.csdnimg.cn/f74bb0339ebc4eb0af2f9b5ccd00bde0.png)
c.NotebookApp.ip='0.0.0.0'#
# 之前生成的密码
c.NotebookAPP.password = u'sha1:364e7540ff84:f13729de68ab717bb352b3451f346a268e7e3c2b'
# 服务器端不允许打开浏览器。
c.NotebookApp.open_browser = False
# 端口设置。
c.NotebookApp.port = 8888
# 默认工作窗口。
c.NotebookApp.notebook_dir = '/root/jupyter_projects' # ^y ^g^l ^x Jupyter ^z^d ^{ ^u ^l ^k ^m $
# 允许root模式运行jupyter notebook.
c.NotebookApp.allow_root = True
-第五步,运行jupyter
jupyter notebook --allow-root # 如果之前没加 allow_root = True 的话。
![在这里插入图片描述](https://img-blog.csdnimg.cn/965496f197a343ba87fc5bce45f2df4d.png) 显示如上,在本地打开,则需要根据服务器对应的端口来进行。 比如我们服务器的端口进行了映射: ![在这里插入图片描述](https://img-blog.csdnimg.cn/1dbd9cdbaeb742229512867640b7ca9a.png) 但是一般的话:只需根据服务器ip和刚刚端口进行打开就可以了。 http://address_of_remote:8888
![在这里插入图片描述](https://img-blog.csdnimg.cn/3e6ec2ea463d47a4a4d2447ca392aa03.png?x-oss-process=image/watermark,type_ZHJvaWRzYW5zZmFsbGJhY2s,shadow_50,text_Q1NETiBA5qKF5rSl5aSq6YOO,size_20,color_FFFFFF,t_70,g_se,x_16)
|