Skip to content

Commit a457f7f

Browse files
committed
Merge pull request apache#116 from dputler/master
Adding the script to install software on the Cloudera Quick Start VM to go along with the wiki entry.
2 parents 0fa48d1 + caad5d7 commit a457f7f

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

SparkR_prep-0.1.sh

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
#!/bin/sh
2+
3+
# Create and move to a new directory that can be easily cleaned up
4+
mkdir build_SparkR
5+
cd build_SparkR
6+
7+
## Uninstall R 3.1.1 (This is a really ugly process, the RHEL/Centos R packages need work)
8+
sudo rpm --noscripts -e --allmatches R
9+
sudo rm --force /usr/bin/R*
10+
sudo rm -r --force /usr/include/R
11+
sudo rm -r --force /usr/lib64/R
12+
sudo rm -r --force /usr/share/R
13+
sudo rm -r --force /usr/share/doc/R-3.1.1
14+
15+
## Download, build, and install R 3.1.2
16+
# Install devel packages needed to build R
17+
sudo yum install libXt-devel readline-devel pango-devel libjpeg-turbo-devel libtiff-devel
18+
# Download and expand the R source tarball
19+
wget http://cran.rstudio.com/src/base/R-3/R-3.1.2.tar.gz
20+
tar xzvf R-3.1.2.tar.gz
21+
cd R-3.1.2
22+
# Build R
23+
./configure --enable-R-shlib R_RD4PDF="times,hyper"
24+
make
25+
sudo make install
26+
27+
# Re-configure the R/Java connection
28+
sudo -E /usr/local/bin/R CMD javareconf
29+
30+
# Install additional needed R packages
31+
sudo /usr/local/bin/Rscript -e 'install.packages(c("rJava", "Rserve"), repos = "http://cran.rstudio.com")'
32+
33+
# Install Scala 2.10.4
34+
wget http://www.scala-lang.org/files/archive/scala-2.10.4.tgz
35+
tar xzvf scala-2.10.4.tgz
36+
sudo mkdir /usr/local/share/scala
37+
sudo mv scala-2.10.4/* /usr/local/share/scala
38+
rmdir scala-2.10.4
39+
40+
# Clean-up
41+
#cd ..
42+
#rm -r --force build_SparkR

0 commit comments

Comments
 (0)