Extension:Shiny/Ubuntu 14.04 LTS

For installing the Shiny extension are three or four steps are necessary:


 * 1) Install a current R version
 * 2) Install the Shiny server
 * 3) Install the Shiny extension
 * 4) Optionally tweak the Apache configuration

R
You may install a R version which comes with your linux distribution by

apt-get install r-recommended

However, the instructions for the Shiny server urge to use the latest R version which may not (yet) part of the repositories of your linux distribution.

deb https:///bin/linux/ubuntu trusty/
 * Therefore you need to add a CRAN repository to the file /etc/apt/sources.list
 * See https://cran.r-project.org/mirrors.html for the list of CRAN mirrors

apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9 apt-get update apt-get install r-recommended After that R should have been installed (or updated) from the choosen CRAN mirror.
 * Then run

Shiny server
R -e "install.packages('shiny', repos='https://cran.rstudio.com/')" apt-get install gdebi-core wget https://download3.rstudio.org/ubuntu-12.04/x86_64/shiny-server-1.4.2.786-amd64.deb gdebi shiny-server-1.4.2.786-amd64.deb cd /srv/shiny-server mkdir mediawiki chown www-data:www-data mediawiki
 * Install the shiny package in R
 * Install the gdebi package
 * Download the Shiny server (check if the version 1.4.2.786 still is okay)
 * Install the Shiny server to your system
 * To check if the shiny server works enter in your browser: http://:3838
 * Add a path and permissions to store the shiny apps

MediaWiki
cd /extensions apt-get install git git clone https://guthub.com/sigbertklinke/Shiny wfLoadExtension( 'Shiny' );
 * After the installation of your wiki go to the extensions directory
 * If necessary then install git</tt>
 * Clone the Shiny extension from github.com</tt>
 * Edit your <my.wiki>/LocalSettings.php</tt> and add at the end

Apache
The Apache webserver listens to port 80 and the Shiny server to port 3838. Usually I modify the Apache configuration file such that any URL with starts with http://<my.domain>/shiny</tt> is redirected to the Shiny server:

cd /etc/apache2 a2enmod proxy_http <VirtualHost *:80> ... some other config stuff ... <Proxy /shiny/> Allow from localhost </Proxy> ProxyPreserveHost On  ProxyPass /shiny/ http://localhost:3838/ ProxyPassReverse /shiny/ http://localhost:3838/ </VirtualHost> service apache2 restart
 * Go to the Apache configuration directory
 * Enable the proxy_http</tt> module
 * Edit the Apache configuration file /etc/apache2/sites-available/000.default.conf</tt> and add at the end
 * Restart the apache server
 * To check if this works properly enter in your browser: http://<my.domain>/shiny/</tt> (and when you enter http://<my.domain>:3838/</tt> you should see the same page)