Skip to content

Instantly share code, notes, and snippets.

View KarthiAru's full-sized avatar

Karthik Arumugham KarthiAru

View GitHub Profile
sudo groupadd shiny-apps
sudo usermod -aG shiny-apps karthiaru
sudo usermod -aG shiny-apps shiny
cd /srv/shiny-server
sudo chown -R karthiaru:shiny-apps .
sudo chmod g+w .
sudo chmod g+s .
#install Shiny, ShinyJS and rmarkdown package
sudo su - -c "R -e \"install.packages(c('shiny','shinyjs','rmarkdown'), dependencies=TRUE, INSTALL_opts = c('--no-lock'), repos='https://cran.rstudio.com/')\""
#replace the following two lines with the code from Shiny Server downloads page
wget https://download3.rstudio.org/ubuntu-12.04/x86_64/shiny-server-1.4.6.809-amd64.deb
sudo gdebi shiny-server-1.4.6.809-amd64.deb
#install all your R packages here
sudo su - -c "R -e \"install.packages(c('devtools','data.table','magrittr','stringi','stringr','ggplot2','dplyr'), dependencies=TRUE, INSTALL_opts = c('--no-lock'), repos='http://cran.rstudio.com/')\""
#devtools dependencies
sudo apt-get -y install libcurl4-gnutls-dev
sudo apt-get -y install libxml2-dev
sudo apt-get -y install libssl-dev
sudo /bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=1024
sudo /sbin/mkswap /var/swap.1
sudo /sbin/swapon /var/swap.1
sudo sh -c 'echo "/var/swap.1 swap swap defaults 0 0 " >> /etc/fstab'
#install pre-requisites
sudo apt-get -y install libapparmor1 gdebi-core
#replace the following two lines with the code from RStudio Server downloads page
wget https://download2.rstudio.org/rstudio-server-0.99.903-amd64.deb
sudo gdebi rstudio-server-0.99.903-amd64.deb
#update packages
sudo apt-get update
#add trusty to our sources.list
sudo sh -c 'echo "deb http://cran.rstudio.com/bin/linux/ubuntu trusty/" >> /etc/apt/sources.list'
#add the public keys
gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9
gpg -a --export E084DAB9 | sudo apt-key add -
#install R
sudo apt-get update
sudo apt-get -y install r-base
sudo adduser karthiaru
sudo gpasswd -a karthiaru sudo
sudo su - karthiaru
chmod 400 ~/aws-mumbai.pem
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0644 for '/Users/Karthik/aws-mumbai.pem' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
bad permissions: ignore key: /Users/Karthik/aws-mumbai.pem
Permission denied (publickey).