HowTo Install R Shiny Server in Centos 7/RHEL 7 Guide

Shiny is an R package that makes it easy to build interactive web applications (apps) straight from R. This lesson will get you started building Shiny apps right away. Opensource and Enterprise ready professional software for the R Community. In this Article we are going to see HowTo install R shiny Server in Centos 7/RHEL 7.

It’s widely used to generate HTML 5+CSS application by writing R language code simply. write small piece of code It will auto generate application with .R extension and run from R shiny server using web browser.

Environment:

  • Server machine installed with Centos 7
  • Sudo User Or Root User Access for Installation

Setup Host Name

# hostnamectl set-hostname rshiny --static
# systemctl restart systemd-hostnamed.service

Configure YUM for Packages Installation

Use below two commands to enable EPEL Repository

# wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-9.noarch.rpm
# rpm -ivh epel-release-7-9.noarch.rpm

Install R Shiny Server in Centos 7

# yum install R

It installs around 376 packages by resolving dependencies all together 

Now run R package installation command

# su - \
-c "R -e \"install.packages('shiny', repos='https://cran.rstudio.com/')\""

Rd warning: /tmp/RtmpsqdM5t/R.INSTALL5114625d5c82/shiny/man/updateSelectInput.Rd:35: missing file link ‘I’
 updateSliderInput html
 updateTabsetPanel html
 updateTextAreaInput html
 updateTextInput html
 urlModal html
 validate html
 validateCssUnit html
 verbatimTextOutput html
 verticalLayout html
 viewer html
 wellPanel html
 withMathJax html
 withProgress html
 withTags html
** building package indices
** testing if installed package can be loaded
* DONE (shiny)
Making 'packages.html' ... done

The downloaded source packages are in
 ‘/tmp/RtmpoL151g/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
>
>

Download R Shiny Server Package and Install

Shiny Server Download

# wget https://download3.rstudio.org/centos5.9/x86_64/shiny-server-1.4.2.786-rh5-x86_64.rpm
# yum install --nogpgcheck shiny-server-1.4.2.786-rh5-x86_64.rpm

Shiny-server install successfully after that enable and start services

# systemctl enable shiny-server
# systemctl start shiny-server
# systemctl status shiny-server
● shiny-server.service - ShinyServer
 Loaded: loaded (/etc/systemd/system/shiny-server.service; enabled; vendor preset: disabled)
 Active: active (running) since Thu 2017-06-22 13:40:24 AWST; 33s ago
 Main PID: 20806 (shiny-server)

Allow / Enable Firewall Ports

# firewall-cmd --permanent --add-port=3838/tcp
success
# firewall-cmd --permanent --add-port=3838/udp
success
# firewall-cmd --reload
success

3838 is the default port number used by shiny-server application

Access Shiny Server from Browser

http://localhost:3838

welcome rshiny server

welcome rshiny server

Test R shiny Server Installation from command Line Interface also

Test R Shiny Server Installation

Test R Shiny Server Installation

That’s it your R Shiny Server installed successfully, Rock to Build new applications using R Language

Related Articles

DHCP Server Installation and Configuration Centos 7

NFS Server installation and configuration RHEL 7

Thanks for your wonderful Support and Encouragement

Ravi Kumar Ankam

My Name is ARK. Expert in grasping any new technology, Interested in Sharing the knowledge. Learn more & Earn More

2 Responses

  1. blank prhr666 says:

    good job boy

  2. blank zk says:

    -c “R -e \”install.packages(‘shiny’, repos=’https://cran.rstudio.com/’)\””
    The above command fails to install httpuv package

Leave a Reply

Your email address will not be published. Required fields are marked *