This file contains hidden or 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
## Prepared by Diana Low | |
## https://github.com/dianalow | |
## $ cat /etc/*-release | |
## Red Hat Enterprise Linux Server release 6.5 (Santiago) | |
## $ uname -mrs | |
## Linux 2.6.32-431.11.2.el6.i686 i686 | |
## Get Fedora EPEL | |
## Full guide here http://www.tecmint.com/how-to-enable-epel-repository-for-rhel-centos-6-5/ | |
## Depends on your distro! | |
wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm | |
rpm -ivh epel-release-6-8.noarch.rpm | |
## Verify repo | |
yum repolist | |
## Install R dependencies texinfo and texinfo-tex | |
## Check rpmfind for appropriate rpms | |
wget ftp://195.220.108.108/linux/centos/6.5/os/i386/Packages/texinfo-4.13a-8.el6.i686.rpm | |
wget ftp://195.220.108.108/linux/centos/6.5/os/i386/Packages/texinfo-tex-4.13a-8.el6.i686.rpm | |
rpm -ivh texinfo-4.13a-8.el6.i686.rpm | |
rpm -ivh texinfo-tex-4.13a-8.el6.i686.rpm | |
## Full instructions here: http://www.rstudio.com/shiny/server/install-opensource | |
## Install R | |
sudo yum install R | |
## Install Shiny package | |
sudo su - \ | |
-c "R -e \"install.packages('shiny', repos='http://cran.rstudio.com/')\"" | |
## Unfortunately the institute personal server is 32bit, so I have to compile Shiny server from source | |
## If yours is 64bit, just grab the rpm | |
## Full instructions here : https://github.com/rstudio/shiny-server/wiki/Building-Shiny-Server-from-Source | |
## Shiny dependencies | |
## cmake | |
wget http://www.cmake.org/files/v2.8/cmake-2.8.11.2.tar.gz | |
tar xzf cmake-2.8.11.2.tar.gz | |
cd cmake-2.8.11.2 | |
./configure | |
make | |
sudo make install | |
## get the shiny-server pack! | |
# Clone the repository from GitHub | |
git clone https://github.com/rstudio/shiny-server.git | |
# Get into a temporary directory in which we'll build the project | |
cd shiny-server | |
mkdir tmp | |
cd tmp | |
# Add the bin directory to the path so we can reference node | |
DIR=`pwd` | |
PATH=$PATH:$DIR/../bin/ | |
# See the "Python" section below if your default python version is not 2.6 or 2.7. | |
PYTHON=`which python` | |
# Check the version of Python. If it's not 2.6.x or 2.7.x, see the Python section below. | |
$PYTHON --version | |
# Use cmake to prepare the make step. Modify the "--DCMAKE_INSTALL_PREFIX" | |
# if you wish the install the software at a different location. | |
cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DPYTHON="$PYTHON" ../ | |
# Get an error here? Check the "How do I set the cmake Python version?" question below | |
# Recompile the npm modules included in the project | |
make | |
mkdir ../build | |
(cd .. && bin/npm --python="$PYTHON" rebuild) | |
# Need to rebuild our gyp bindings since 'npm rebuild' won't run gyp for us. | |
(cd .. && ext/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js --python="$PYTHON" rebuild) | |
# Install the software at the predefined location | |
sudo make install | |
# Place a shortcut to the shiny-server executable in /usr/bin | |
sudo ln -s /usr/local/shiny-server/bin/shiny-server /usr/bin/shiny-server | |
#Create shiny user. On some systems, you may need to specify the full path to 'useradd' | |
sudo useradd -r -m shiny | |
# Create log, config, and application directories | |
sudo mkdir -p /var/log/shiny-server | |
sudo mkdir -p /srv/shiny-server | |
sudo mkdir -p /var/lib/shiny-server | |
sudo chown shiny /var/log/shiny-server | |
sudo mkdir -p /etc/shiny-server | |
## Self compiled shiny-server did not auto create .conf file, | |
## so make your own at /etc/shiny-server/shiny-server.conf | |
## If not running pro version, be sure to comment out the pro-only commands in the .conf file | |
sudo /usr/local/shiny-server/bin/deploy-example default |