Created
January 30, 2014 15:44
-
-
Save csarven/8711388 to your computer and use it in GitHub Desktop.
install.shiny-server.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Install Node.js | |
sudo apt-get update | |
sudo apt-get install software-properties-common python-software-properties python g++ make | |
sudo add-apt-repository ppa:chris-lea/node.js | |
sudo apt-get update | |
sudo apt-get install nodejs | |
# Install R | |
sudo add-apt-repository "deb http://cran.rstudio.com/bin/linux/ubuntu $(lsb_release -cs)/" | |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9 | |
sudo apt-get update | |
sudo apt-get install r-base r-base-dev | |
sudo apt-get install libcurl4-openssl-dev | |
# Install Shiny in system-wide library | |
sudo su - -c "R -e \"install.packages('shiny', repos='http://cran.rstudio.com/')\"" | |
#sudo npm install log4js | |
#sudo npm install -g shiny-server | |
sudo npm install -g https://github.com/rstudio/shiny-server/tarball/master | |
# Install Upstart script | |
sudo wget https://raw.github.com/rstudio/shiny-server/master/config/upstart/shiny-server.conf -O /etc/init/shiny-server.conf | |
# Create a system account to run Shiny apps | |
sudo useradd -r shiny | |
# Create a root directory for your website | |
sudo mkdir -p /var/shiny-server/www | |
# Create a directory for application logs | |
sudo mkdir -p /var/shiny-server/log | |
# Start Shiny | |
sudo start shiny-server | |
# Optional: Install examples to test | |
sudo cp -R /usr/local/lib/R/site-library/shiny/examples /var/shiny-server/www/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment