Notice: My operating system: centos 7.5(Python 2.7 built in)
Step 1: Download Anaconda
We will install Anaconda3 firstly, Ananconda3 include JupyterNotebook what we need. By the way, Anaconda3 provides Python3.7 while a Python2.7 was pre-built in centos. After the installation, We can use ‘python3 ‘command to open the terminal of python3.7.
Download the installation sh file.
Wget HTTP: / / https://repo.anaconda.com/archive/Anaconda3-2018.12-Linux-x86_64.sh
Start the Installation. Bash anaconda3-2018.12-linux-x86_64. sh
During the the process of installation, you are supposed to input enter
or yes
when it stops to ask you.However, there is a moment you should input no
when it ask you if you wanna continue to install VSCode. You hardly use that.
Step 2: Configuration of Anaconda
Anaconda will be installed at /root/anaconda3
defaultly. You can use vi /etc/profile
to edit system configuration. Add these two statements below to the end of the configuration file. export ANACONDA_HOME="/root/anaconda3"
export PATH=$PATH:$ANACONDA_HOME/bin
Then use the following instructions to make the changed configuration take effect. source /etc/profile
Step 3: Configuration of Jupyter Notebook
Run the code below to generate configuration file. jupyter notebook --generate-config
The response often is Writing default config to: /root/.jupyter/jupyter_notebook_config.py
Since Jupyter 5.0, it provides a simple method to set your password: jupyter-notebook password
the generated password is stored at jupyter_notebook_config.json
When you deploy the JN successfully, you need to give the correct password.
Step 4: Run the JN
Run the Jupyter Notebook with the command below. Nohup jupyter-notebook — IP =0.0.0.0 –port 8000 –no-browser & Nohup can ensure your operation stay effective even if you log out your current session with your cloud server. Without it, after you log out or close the session with your server, all these processes you started during the current session will be killed by system. –port assign a avaliable port to JN, JN will listen on the assigned port, if you failed to run the JN, you are recommanded to check if the assigned port is in conflict. –no-broswer is self-description. Now you can access Your remote JN by ‘your-server-IP :8000(decided by you)’. For example: 12.3.4.5:8000