How To Install Shiny Server on CentOS 7

   In this post, I'll show how to install Shiny Server on CentOS 7. I assume that you have already installed R and Shiny package on your work environment.
    The installation process goes as a following.

1. First, check the page of  Shiny Server open source in this link.

2. Select RedHat/CentOS 6&7 tab, and copy the commands that include the latest version of a shiny server. Run the commands that similar below. 

  # 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


3. Start the Shiny Server and enable it.

  # systemctl start shiny-server
  # systemctl enable shiny-server


4. Check active connections.

 # netstat -tlpn
 Active Internet connections (only servers)
 Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
 tcp        0      0 0.0.0.0:3838            0.0.0.0:*               LISTEN      31878/shiny-server
 ...



4. Add port into the firewall and reload.

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

5. We check the service by opening the shiny server in a browser (IP or domain name of CentOS machine with a port number 3838). As it is shown in the below image, the server is running.




6. Shiny server application files are located in a below path.

# ls /srv/shiny-server
index.html  sample-apps


Thank you for reading!

No comments:

Post a Comment