1. 生成一个 notebook 配置文件。
[atguigu@hadoop101 桌面]$ jupyter notebook --generate-config
Writing default config to: /home/atguigu/.jupyter/jupyter_notebook_config.py (这是一个隐藏文件)
2、生成密码。
在terminal中输入ipython。
In [2]: from notebook.auth import passwd
In [3]: passwd()
Enter password:
Verify password:
Out[3]: 'sha1:62e626059736:7788c2a6ad5ba4343c0e18ddd66b4f0e2ddf74f0'
3. 修改配置文件
sudo vim /home/atguigu/.jupyter/jupyter_notebook_config.py
在 jupyter_notebook_config.py
中找到下面的行,取消注释并修改
c.NotebookApp.allow_remote_access = True #如果是比较老的