Prerequisites for Installing RHIPE 1.A working Hadoop cluster 2.R installed as a shared library 3.Google protocol buffers 4.Environment variables - Prerequisite 1: Hadoop - Prerequisite 2: R as a Shared Library # R 제거 $ sudo apt-get remove r-base-core # R 설치: 아래 참고하여 설치할 것 #################################################### $ wget http://infostat.dongguk.ac.kr/CRAN/src/base/R-2/R-2.15.1.tar.gz $ tar -xzf R-2.15.1.tar.gz $ cd R-2.15.1 # need to build shared library (--enable-R-shlib) $ ./configure --enable-R-shlib # --prefix=... //오류시 아래 패키지 설치 후 재시도 $ sudo apt-get install libX11-dev $ sudo apt-get install libxt-dev //#설치 $ sudo make $ sudo make install #################################################### - Prerequisite 3: Protocol Buffers #################################################### # Download Protobuf from here. $ wget http://protobuf.googlecode.com/files/protobuf-2.4.1.tar.gz # Decompress downloaded file. $ tar -xzf protobuf-2.4.1.tar.gz $ cd protobuf-2.4.1 # configuration $ sudo ./configure --prefix /usr # Set Environment Path $ export LD_LIBRARY_PATH=/usr/local/lib # install $ sudo make $ sudo make install $sudo vi /etc/profile ---맨뒤에 아래 추가 PATH=$PATH:/home/stat/hadoop/bin:/home/stat/R-2.15.1/bin export PATH ---- $source /etc/profile 해주시면 적용됩니다. #################################################### 5.Install binutils-gold for (Ubuntu 11.10). This package is used to resolve link error when compiling RHIPE in (Ubuntu 11.10). I found an article that describes linker of Ubuntu is changed slightly in order of parameters, therefore, RHIPE makes many many link errors. To install, just follow the command if binutils-gold is not installed. $ sudo apt-get install binutils-gold - Prerequisite 4: Environment Variable $ sudo vi /etc/R/Rprofile.site #################################################### Sys.setenv(JAVA_HOME="/usr/lib/jvm/java-7-oracle") Sys.setenv(HADOOP_HOME="/home/stat/hadoop") Sys.setenv(HADOOP_BIN="/home/stat/hadoop/bin") #################################################### - Installing Rhipe #################################################### $ wget https://github.com/downloads/saptarshiguha/RHIPE/Rhipe_0.67.tar.gz 또는 $ wget http://datamining.dongguk.ac.kr/hadoop/Rhipe_0.67.tar.gz $ tar -xzf Rhipe_0.67.tar.gz $ sudo R CMD INSTALL Rhipe_0.67.tar.gz #################################################### #아래의 에러발생시 g++ -I/usr/share/R/include -DNDEBUG -fpic -O3 -pipe -g -I. -O3 -pipe -g -DHAVE_UINTPTR_T `/usr/lib/R/bin/R CMD config --cppflags` `pkg-config --cflags protobuf` -c signal.cc -o signal.o /bin/bash: pkg-config: 명령어를 찾을 수 없음 $ sudo apt-get install pkg-config ###### 네이티브 스내피 라이브러리를 하둡으로 복사 wget http://anova.dongguk.ac.kr/snappy-1.0.5.tar.gz tar -xzf snappy-1.0.5.tar.gz cd snappy-1.0.5 ./configure --enable-shared sudo make sudo make install cp /usr/local/lib/libsnappy.* /home/stat/hadoop/lib/native/Linux-amd64-64 cp /usr/local/lib/libsnappy*.* /home/stat/hadoop/lib/native/Linux-i386-32