Skip to main content

Posts

Shiny Server (Open Source edition) configuration quick reference

An appendix to complete the tutorial about the Shiny Server (OS edition) installation: a quick reference to its configuration. The configuration file of a Shiny Server is stored in the /etc/shiny-server/shiny-server.conf file. It comes in a format like this: run_as shiny; server {   listen 3838;   location / {     site_dir /srv/shiny-server;         log_dir /var/log/shiny-server;         directory_index on;   } } Here's the explanation of the parameters: run_as : to set the system user to run R/Shiny applications. Don't use root. server : this block defines a single server details (see the following properties). listen : the server listening port. The default value is 3838. location : defines a location available at the base URL. site_dir : the directory hosting the Shiny web apps. log_dir : the directory where the Shiny Server logs are stored. directory_index : to enable ( on ) ...

A tricky exception running MapReduce functions through RHadoop: root cause and how to fix it.

RHadoop ( https://github.com/RevolutionAnalytics/RHadoop/wiki ) is a collection of five R packages (rhdfs, rmr2, rhbase, ravro, plyrmr) that allow users to manage and analyze data with Hadoop. Running any MapReduce function, also this simple one     from.dfs(mapreduce(to.dfs(1:100)))  through RHadoop on Linux servers you could face this exception: 2015-10-20 08:39:41,722 ERROR [main] org.apache.hadoop.streaming.PipeMapRed: configuration exception java.io.IOException: Cannot run program "Rscript": error=2, No such file or directory     at java.lang.ProcessBuilder.start(ProcessBuilder.java:1059)     at org.apache.hadoop.streaming.PipeMapRed.configure(PipeMapRed.java:209)     at org.apache.hadoop.streaming.PipeMapper.configure(PipeMapper.java:66)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav...

Quick guide to install Shiny Server (Open Source Edition)

Shiny Server (https://www.rstudio.com/products/shiny/shiny-server/ ) is a server to put Shiny ( http://shiny.rstudio.com/ ) applications or interactive documents available over the web. The official documentation seems quite confusing to me, so I want to share this quick tutorial for people approaching it for the first time. The procedure explained in this post has been tested and replicated on several Linux Red Hat Servers 6.6+ 64-bit, but it should work on any Linux distribution that allows RPM management. The overall procedure could be of course automated, but for better understanding of this tutorial I am going to describe any manual step involved. Installation Connect to your Linux server as root and download the latest RPM for your specific architecture: wget https://download3.rstudio.org/centos5.9/x86_64/shiny-server-1.4.0.721-rh5-x86_64.rpm and then install it using yum: yum install --nogpgcheck shiny-server-1.4.0.721-rh5-x86_64.rpm At the end of the installation p...