1.下载
https://www.anaconda.com/download/#linux
2.安装

# bash Anaconda3-5.0.1-Linux-x86_64.sh 

选择默认安装路径:

Anaconda3 will now be installed into this location:
/root/anaconda3

  - Press ENTER to confirm the location
  - Press CTRL-C to abort the installation
  - Or specify a different location below

[/root/anaconda3] >>> 

安装中其他选项都选 yes

Thank you for installing Anaconda3!

****安装完毕***
使生效:

# source ~/.bashrc

3.手动设置密码:

# python
Python 3.6.3 |Anaconda, Inc.| (default, Oct 13 2017, 12:02:49) 
[GCC 7.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from notebook.auth import passwd
>>> passwd()
Enter password: 
Verify password: 
'sha1:a59919c8215d:670d591c340f4fd92a2aea6f6f8da9d19eea6238'
>>> 

'sha1:a59919c8215d:670d591c340f4fd92a2aea6f6f8da9d19eea6238'这一串就是要在 jupyter_notebook_config.py 添加的密码。

c.NotebookApp.password = u'sha1:a59919c8215d:670d591c340f4fd92a2aea6f6f8da9d19eea6238'

4.修改配置文件:
在 /root/.jupyter/jupyter_notebook_config.py中找到下面的行,取消注释并修改。

c.NotebookApp.ip='*'
c.NotebookApp.password = u'sha1:a5...刚才复制的那个密文'
c.NotebookApp.open_browser = True
c.NotebookApp.port =8888 #可自行指定一个端口, 访问时使用该端口

以上设置完以后就可以在服务器上启动 jupyter notebook,root 用户使用 jupyter notebook --allow-root。浏览器打开 IP:指定的端口, 输入密码就可以访问了。
后台启动:

#nohup jupyter notebook --allow-root&

如图: