在安装好anaconda后
jupyter notebook –generate-config –allow-root
利用ipython生成密码
[root@localhost ~]# ipython
Python 3.6.2 |Anaconda, Inc.| (default, Sep 30 2017, 18:42:57)
Type 'copyright', 'credits' or 'license' for more information
IPython 6.1.0 -- An enhanced Interactive Python. Type '?' for help.
In [1]: from notebook.auth import passwd
In [2]: passwd()
Enter password:
Verify password:
Out[2]: '*******'
vi /root/.jupyter/jupyter_notebook_config.py
c.NotebookApp.ip='*'
c.NotebookApp.password = u'*******'将上述生成的密码复制到这里
c.NotebookApp.open_browser = False
c.NotebookApp.port =8888
远程连接服务器后,终端输入Jupyter notebook
打开服务。在浏览器中输入
,测试是否访问成功,访问不成功请将服务器防火墙关闭:
systemctl stop firewalld.service