-
Linux Anaconda Installation (Anaconda conveniently installs Python, the Jupyter Notebook, and other commonly used packages for scientific computing and data science. )
-
Under Linux Anaconda Installation (copy link of 64 bit):
On Terminal$ wget copied link
It will download Anaconda*.sh file
- Installing by using following command:
$ bash Anaconda2-4.0.0-Linux-x86_64.sh Enter(many times) >> yes >> give directory or keep it as Default
-
Installing Python3 (dependency of jupyterhub is on python3)
$ sudo apt-get install python3-pip
-
Install nodejs/npm
$ sudo apt-get install npm nodejs-legacy
-
Install proxy with npm
$ npm install -g configurable-http-proxy
-
Install Jupyterhub
$ pip3 install jupyterhub
-
Install Jupyter notebook (/upgrade)
$ pip3 install --upgrade notebook
-
Test Jupyterhub default configuration
$ jupyterhub --no-ssl
This will start session in localhost:8000
** Make sure that port isnt protected under Firewall of your system
-
It is reccommended to use secure SSL certificate file for the public facing interface of the proxy.
To produce personal security certificates commands are as follows:$ openssl req x509 nodes days 365 newkey rsa:1024 keyout mykey.key out mycert.pem
**Fill in the credentials.(even if you dont..It's ok!)
-
Create Jupyterhub configuration file
$ jupyterhub --generate-config
-
We will use Github OAuthentication as our Authenticator.
so steps are as follows:
1. Go to your Github profile > Settings > Oauth application
2. Register new application
3. Under callback URL is: [https://your_host/hub/oauth_callback](http://www.example.com)<br>
Where **yourhost** is where your server will be running. Such as example.com:8000 .
4. click on Update/Create application.<br>
You will see Client id and secret key generated above:<br>
Github client_id = '---Some cryptic string----'
Github client_secret = '---Some cryptic string----'
-
In Terminal, write command
$ sudo nano jupyterhub_config.py
-
Install OAuthenticator:
$ pip3 install oauthenticator
-
Create userlist file
$ sudo nano userlist
It should be like username and admin after one space for giving admin right otherwise only username for normal user.
Example:nipunsadvilkar admin manasRK admin Benybrahim
** Make sure that these username should match with your Github profile name.
-
Create these users in your server machine:
For ubuntu:
$ sudo adduser nipunsadvilkar
fill in credentials. and same for other users.
-
Create Default Directory for your Jupyter Notebooks:
$ sudo mkdir /home/nipunsadvilkar/notebooks
So now all users notebooks will be under ~/notebooks directory
-
Now Edit jupyter_config.py as follows: