How to install and configure R Shiny

From DISI
Revision as of 23:45, 16 July 2018 by Jizhou (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This tutorial shows how to install R Shiny on Centos 7.

Install R

sudo yum install R

Install Shiny and dependency packages

sudo su - -c "R -e \"install.packages(c('shiny', 'rmarkdown', 'devtools', 'RJDBC'), repos='http://cran.rstudio.com/')\""

Download and install R Shiny server

wget https://download3.rstudio.org/centos6.3/x86_64/shiny-server-1.5.7.907-rh6-x86_64.rpm
sudo yum install --nogpgcheck shiny-server-1.5.7.907-rh6-x86_64.rpm

Start and Stop R Shiny server

sudo systemctl start shiny-server
sudo systemctl stop shiny-server

Modify firewall rules (if needed) to allow users to access R shiny server

sudo firewall-cmd --permanent --zone=public --add-port=3838/tcp
sudo firewall-cmd --reload

Visit Shiny server

http://<your-server-IP>:3838/

Configure Shiny server

The Shiny configuration file is /etc/shiny-server/shiny-server.conf
Modify this file for customized configuration