bash , python3 환경에서 진행하였습니다.
jupyter 를 설치합니다.$ pip3 install jupyter
$ jupyter notebook
jupyter notebook에 외부접속을 해야 합니다.$ jupyter notebook --generate-config
/home/user/.ssl 생성했습니다.$ sudo openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout "cert.pem" -out "cert.pem" -batch
python3 를 실행시켜서 아래 명령어로 비밀번호 hash값을 구하고 기록해 놓습니다.
$ python3
>>> from notebook.auth import passwd ; passwd()
Enter password:
Verify password:
'sha1:2f9934b619d7:0df82234bd10b7637f3230de73dc624d73f5d9df'
~/.jupyter/jupyter_notebook_config.py 파일 맨 아래 줄에 다음 내용을 추가합니다.
c = get_config() # Get the config object.
c.IPKernelApp.pylab = 'inline' # in-line figure when using Matplotlib
c.NotebookApp.ip = '*' # Serve notebooks locally.
c.NotebookApp.open_browser = False # Do not open a browser window by default when using notebooks.
c.NotebookApp.password = 'sha1:2f9934b619d7:0df82234bd10b7637f3230de73dc624d73f5d9df'
c.NotebookApp.certfile = u'/your/absolute/directory/path/ssl/cert.pem' # path to the certificate we generated
c.NotebookApp.keyfile = u'/your/absolute/directory/path/ssl/cert.pem' # path to the certificate key we generated
nohup으로 실행시켜 줍니다.
$ nohup jupyter notebook &
$ sudo chown -R ubuntu.ubuntu ~/.local/share/