From a7dadec6d33ebad0d716caa5c58d6818a288a28a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrzej=20W=C3=B3jtowicz?= Date: Thu, 28 Apr 2016 13:48:11 +0200 Subject: [PATCH] init install-env --- install-env.sh | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 install-env.sh diff --git a/install-env.sh b/install-env.sh new file mode 100644 index 0000000..ff7814b --- /dev/null +++ b/install-env.sh @@ -0,0 +1,42 @@ +#!/bin/bash + +WGET_OPTIONS="--no-check-certificate" +MRO_VERSION="3.2.4" + +# update debian repos & upgrade packages +sed -i -e 's/ftp.debian.org/ftp.pl.debian.org/ig' /etc/apt/sources.list +sed -i -e 's/wheezy/jessie/ig' /etc/apt/sources.list + +apt-get update +DEBIAN_FRONTEND=noninteractive apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confnew" upgrade + +# install new packages for R +apt-get -y install build-essential gfortran ed htop libxml2-dev ca-certificates curl libcurl4-openssl-dev gdebi-core sshpass + +# hack with Microsoft R Open deps +wget ${WGET_OPTIONS} http://ftp.pl.debian.org/debian/pool/main/libj/libjpeg8/libjpeg8_8d1-2_amd64.deb +gdebi -n libjpeg8_8d1-2_amd64.deb +rm libjpeg8_8d1-2_amd64.deb + +# install Microsoft R Open +wget ${WGET_OPTIONS} https://mran.microsoft.com/install/mro/${MRO_VERSION}/MRO-${MRO_VERSION}-Ubuntu-15.4.x86_64.deb +gdebi -n MRO-${MRO_VERSION}-Ubuntu-15.4.x86_64.deb +rm MRO-${MRO_VERSION}-Ubuntu-15.4.x86_64.deb + +# update R repository url +sed -i -e 's/mran.revolutionanalytics.com/mran.microsoft.com/ig' /usr/lib64/MRO-${MRO_VERSION}/R-${MRO_VERSION}/lib/R/etc/Rprofile.site + +# update R reposritory snapshot day +sed -i -e 's/2016-01-01/2016-04-10/ig' /usr/lib64/MRO-${MRO_VERSION}/R-${MRO_VERSION}/lib/R/etc/Rprofile.site + +# install RevoMathUtils +wget ${WGET_OPTIONS} https://mran.microsoft.com/install/mro/${MRO_VERSION}/RevoMath-${MRO_VERSION}.tar.gz +tar -xvzf RevoMath-${MRO_VERSION}.tar.gz + +cd RevoMath +sed -i '16,18d' RevoMath.sh + +echo 1 | ./RevoMath.sh + +cd .. +rm -r RevoMath*