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

For all steps it is assumed that a LAMP server and MediaWiki is installed and you are logged in as.

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
 * 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  package in R
 * Install the  package
 * Download the Shiny server (check if the version  still is okay)
 * Install the Shiny server to your system
 * To check if the shiny server works enter in your browser:
 * Add a path and permissions to store the shiny apps

MediaWiki
cd  /extensions apt-get install git git clone https://github.com/sigbertklinke/Shiny wfLoadExtension( 'Shiny' );
 * After the installation of your wiki go to the  directory
 * If necessary then install
 * Clone the Shiny extension from
 * Edit your  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  is redirected to the Shiny server:

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