Created
August 9, 2018 18:02
-
-
Save Jarrioja/515535cb3c19cd02d4c4e4a15170f35c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!bin/bash | |
| # quietly add a user without password | |
| adduser --quiet --disabled-password --shell /bin/bash --home /home/adminhub --gecos "User" adminhub | |
| # set password | |
| echo "adminhub:adminhub" | chpasswd | |
| wget https://repo.anaconda.com/archive/Anaconda3-5.2.0-Linux-x86_64.sh | |
| bash Anaconda3-5.2.0-Linux-x86_64.sh -b | |
| #Instalar NodeJS | |
| curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - | |
| apt-get -y install nodejs | |
| #Instalar Java Runtime Environment | |
| sudo apt-get -y install default-jre | |
| #Instalar Python 3 | |
| apt-get -y install python3-pip | |
| #Instalar configurable-http-proxy | |
| npm install -g configurable-http-proxy | |
| #Instalar Optimus & Spark | |
| pip3 install optimuspyspark | |
| #Instalar JupyterHub | |
| pip3 install jupyterhub | |
| #Actualizar notebook | |
| pip3 install --upgrade notebook | |
| #Generar archivo de configuración | |
| mkdir /etc/jupyterhub | |
| cd /etc/jupyterhub | |
| wget https://gist.github.com/Jarrioja/946cd833494f84a03fbd1b02704158b5/raw/675b607f619075206f32455c5efe9e58910d2941/jupyterhub_config.py | |
| pip3 install jupyterlab | |
| jupyter serverextension enable --py jupyterlab --sys-prefix | |
| jupyter labextension install @jupyterlab/hub-extension --dev | |
| jupyter lab build --dev | |
| cd | |
| #Create init file | |
| cd /etc/init.d/ | |
| wget https://gist.github.com/Jarrioja/a7a63dcd0251c406be35e48bb10145bf/raw/da9cb059d3d365574eff826e0f225905345b02b1/jupyterhub | |
| #Create service | |
| cd /etc/systemd/system/ | |
| wget https://gist.github.com/Jarrioja/e144697ba17bf0cdec73618c7ac1689c/raw/320e61d614926a15c988873a8b7523ec6e48c926/jupyterhub.service | |
| #Enable Autoboot service | |
| systemctl enable jupyterhub | |
| #Start Service | |
| systemctl start jupyterhub | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment