(1) Centos7 install jupyter notebook

One, get jupyter notebook

wget   https://repo.anaconda.com/archive/Anaconda3-2020.11-Linux-x86_64.sh

2. Start the installation: default all the way

sh  Anaconda3-2020.11-Linux-x86_64.sh

Three, generate password

# 进入到jupyter 的安装bin目录
cd  /root/anaconda3/bin/

# 生成jupyter notebook的配置文件
./jupyter notebook --generate-config --allow-root
# 启动ipython,生成密码
./ipython

# 导入notebook.auth中的passwd包,用来生成password
from notebook.auth import passwd

# 调用passwd方法,输入自己的密码,生成加密后的密码
passwd()

Fourth, modify the configuration: please do not forget the letter u before the configuration host and password 

# 在配置文件中修改登录密码
vim /root/.jupyter/jupyter_notebook_config.py

# 按照下边修改配置文件后保存、退出
:wq

①The first modification, any remote host can access

②The second modification, modify the data location

③ Modify the third place, modify the login password, and fill in the paragraph generated in the third step

5. Start in the background, release port 8888 in the security group and firewall, and visit http://ip:8888/login

# 在root下新建上边配置文件中指定的 数据文件夹condadata
mkdir  /root/condadata

# 在bin目录
cd  /root/anaconda3/bin/

# 普通启动:当linux远程串口退出服务就会停止
./jupyter-notebook --allow-root

# 后台运行:除非主机关闭才停止
nohup  ./jupyter-notebook --allow-root  &

# 查看jupyter-notebook启动状态
netstat   -antp

Guess you like

Origin blog.csdn.net/qq_29644709/article/details/114638336