Recent Changes - Search:

Services

Technical Doc. Index

edit SideBar

Shiny Server Setup

Shiny R server

See also Shiny load distribution

Enter VZ guest

In this case, assuming 'goldone':
vzctl enter goldone

Make sure all is up to date

apt update && apt upgrade

Install R from CRAN

Instructions from https://www.digitalocean.com/community/tutorials/how-to-install-r-on-ubuntu-16-04-2

apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
apt install -y software-properties-common
add-apt-repository 'deb [arch=amd64,i386] https://cran.rstudio.com/bin/linux/ubuntu xenial/'
apt install apt-transport-https
apt update
apt install -y r-base gdebi-core

Site-wide R configuration

We want Rprofile.site to look like this:

local({
  r <- getOption("repos")
  r["CRAN"] <- "http://mirror.its.dal.ca/cran/"
  options(repos = r)
})

perl -i -pe 's%https://cloud.r-project.org%http://mirror.its.dal.ca/cran/%' /etc/R/Rprofile.site

Since we are not using an SSL-capable mirror, we want to squelch the big red warning:

cat <<EOF >> /etc/R/Renviron.site
RSTUDIO_DISABLE_SECURE_DOWNLOAD_WARNING=1
EOF

Install Shiny

By default packages go into /usr/local/lib/R/site-library

R -e "install.packages('shiny')"
R -e "install.packages('rmarkdown')"
wget https://download3.rstudio.org/ubuntu-14.04/x86_64/shiny-server-1.5.7.907-amd64.deb
gdebi shiny-server-1.5.7.907-amd64.deb

Testing

From any computer, open both a terminal and a web browser:

In terminal:

ssh -L 3838:192.168.128.11:3838 anchor.phys.ocean.dal.ca
Password:
anchor~:$ 

In web browser: http://localhost:3838/

Edit - History - Print - Recent Changes - Search
Page last modified on May 13, 2018, at 02:39 PM ADT