Skip to content

Instantly share code, notes, and snippets.

@mbannert
Created April 27, 2016 13:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mbannert/693edbe64309291d228d0d7eaa3a57dd to your computer and use it in GitHub Desktop.
Save mbannert/693edbe64309291d228d0d7eaa3a57dd to your computer and use it in GitHub Desktop.
Shiny Server AWS EC2 install script
#!/usr/bin/env bash
# extend resources list and install R
sudo bash -c "echo 'deb http://stat.ethz.ch/CRAN/bin/linux/ubuntu trusty/' >> /etc/apt/sources.list"
sudo apt-get update
sudo apt-get install r-base
# install postgresql
sudo apt-get install postgresql
# install nginx
sudo apt-get install nginx
# install R packages
sudo Rscript -e 'install.packages("shiny",repos="https://stat.ethz.ch/CRAN")'
sudo Rscript -e 'install.packages(c("RPostgreSQL"),repos="https://stat.ethz.ch/CRAN")'
sudo Rscript -e 'install.packages("rmarkdown",repos="https://stat.ethz.ch/CRAN")'
sudo Rscript -e 'install.packages("DT",repos="https://stat.ethz.ch/CRAN")'
sudo Rscript -e 'install.packages("ggplot2",repos="https://stat.ethz.ch/CRAN")'
sudo Rscript -e 'install.packages("shinydashboard",repos="https://stat.ethz.ch/CRAN")'
# install shiny server
sudo apt-get install gdebi-core
wget https://download3.rstudio.org/ubuntu-12.04/x86_64/shiny-server-1.4.2.786-amd64.deb
sudo gdebi shiny-server-1.4.2.786-amd64.deb
# install dev tools
sudo apt-get-install git
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment