Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2294682
  • 博文数量: 276
  • 博客积分: 5998
  • 博客等级: 大校
  • 技术积分: 5175
  • 用 户 组: 普通用户
  • 注册时间: 2010-12-24 14:43
文章分类

全部博文(276)

文章存档

2014年(25)

2013年(11)

2012年(69)

2011年(167)

2010年(4)

分类: 大数据

2014-04-02 21:39:12

本片文章介绍了rhdfs、rmr、plyrmr安装方式,没有介绍rhbase的安装方式
一、网络安装
1、安装hadoop

2、安装R 环境(推荐用yum安装)
 http://blog.chinaunix.net/uid-25135004-id-4173752.html
3、R CMD javareconf 

4、R 进入R命令行
    安装依赖包
install.packages("rJava")
install.packages("Rcpp")
install.packages("plyr") 
install.packages("stringr") 
install.packages("reshape2")
install.packages("iterators")
install.packages("itertools")
install.packages("digest")
install.packages("RJSONIO")
install.packages("functional")

5、设置hadoop命令及hadoop-streaming环境变量
vim  /etc/profile
export HADOOP_CMD=/export/hadoop/bin/hadoop
export HADOOP_STREAMING=/export/hadoop/contrib/streaming/hadoop-streaming-1.2.1.jar
source  /etc/profile

6、安装rhdfs库
    1)下载rhdfs安装包
    
    2)R CMD INSTALL rhdfs_1.0.8.tar.gz 

7、安装rmr库
    1)安装依赖包
    install.packages("bitops")
    install.packages("caTools")
    2)下载rmr安装包
    
    3)R CMD INSTALL rmr2_3.1.0.tar.gz

8、安装plyrmr库
    1)安装依赖包
    install.packages("dplyr")
    install.packages("R.methodsS3")
    install.packages("Hmisc")
    2)下载plyrmr安装包
    
    3)R CMD INSTALL plyrmr_0.2.0.tar.gz

9、检验是否安装成功
    1) 检验rhdfs
> library("rhdfs")
Loading required package: rJava
HADOOP_CMD=/export/hadoop/bin/hadoop
Be sure to run hdfs.init()
> hdfs.init()
>

    2)、检验 rmr2
>library(rmr2)
Loading required package: Rcpp
Loading required package: RJSONIO
Loading required package: bitops
Loading required package: digest
Loading required package: functional
Loading required package: reshape2
Loading required package: stringr
Loading required package: plyr
Loading required package: caTools

    3)检验plyrmr
>library("plyrmr")
Loading required package: dplyr
Attaching package: ‘dplyr’
The following objects are masked from ‘package:plyr’:
    arrange, desc, failwith, id, mutate, summarise, summarize
The following objects are masked from ‘package:stats’:
    filter, lag
The following objects are masked from ‘package:base’:
   intersect, setdiff, setequal, union
Attaching package: ‘plyrmr’
The following objects are masked from ‘package:dplyr’:
   intersect, select, ungroup, union
The following object is masked from ‘package:rmr2’:
   gather
The following object is masked from ‘package:reshape2’:
    dcast
The following objects are masked from ‘package:base’:

二、内网无法上网,下载安装

1、安装hadoop

2、安装R 环境(推荐用yum安装)
 http://blog.chinaunix.net/uid-25135004-id-4173752.html
3、R CMD javareconf 

4、下载以上安装包





























5、设置hadoop命令,及hadoop-streaming环境变量
vim  /etc/profile
export HADOOP_CMD=/export/hadoop/bin/hadoop
export HADOOP_STREAMING=/export/hadoop/contrib/streaming/hadoop-streaming-1.2.1.jar
source  /etc/profile

6、安装依赖包
R CMD INSTALL rJava_0.9-6.tar.gz
R CMD INSTALL Rcpp_0.11.1.tar.gz
R CMD INSTALL plyr_1.8.1.tar.gz 
R CMD INSTALL stringr_0.6.2.tar.gz 
R CMD INSTALL reshape2_1.2.2.tar.gz 
R CMD INSTALL iterators_1.0.6.tar.gz 
R CMD INSTALL itertools_0.1-3.tar.gz 
R CMD INSTALL digest_0.6.4.tar.gz 
R CMD INSTALL RJSONIO_1.0-3.tar.gz
R CMD INSTALL functional_0.4.tar.gz

7、安装rhdfs
R CMD INSTALL rhdfs_1.0.8.tar.gz 

8、安装rmr库
    1)安装依赖包
    R CMD INSTALL bitops_1.0-6.tar.gz
    R CMD INSTALL caTools_1.16.tar.gz 
    2)下载rmr安装包
    
    3)R CMD INSTALL rmr2_3.1.0.tar.gz

9、安装plyrmr库
    1)安装依赖包
R CMD INSTALL assertthat_0.1.tar.gz
R CMD INSTALL BH_1.51.0-4.tar.gz
R CMD INSTALL dplyr_0.1.3.tar.gz 
R CMD INSTALL R.methodsS3_1.6.1.tar.gz 
R CMD INSTALL RColorBrewer_1.0-5.tar.gz
R CMD INSTALL survival_2.37-7.tar.gz
R CMD INSTALL Formula_1.1-1.tar.gz 
R CMD INSTALL latticeExtra_0.6-26.tar.gz 
R CMD INSTALL Hmisc_3.14-3.tar.gz 
    2)下载plyrmr安装包
        
    3)R CMD INSTALL plyrmr_0.2.0.tar.gz

10、检验是否安装成功
    1) 检验rhdfs
> library("rhdfs")
Loading required package: rJava
HADOOP_CMD=/export/hadoop/bin/hadoop
Be sure to run hdfs.init()
> hdfs.init()
>

    2)、检验 rmr2
>library(rmr2)
Loading required package: Rcpp
Loading required package: RJSONIO
Loading required package: bitops
Loading required package: digest
Loading required package: functional
Loading required package: reshape2
Loading required package: stringr
Loading required package: plyr
Loading required package: caTools


    3)检验plyrmr
>library("plyrmr")
Loading required package: dplyr
Attaching package: ‘dplyr’
The following objects are masked from ‘package:plyr’:
    arrange, desc, failwith, id, mutate, summarise, summarize
The following objects are masked from ‘package:stats’:
    filter, lag
The following objects are masked from ‘package:base’:
   intersect, setdiff, setequal, union
Attaching package: ‘plyrmr’
The following objects are masked from ‘package:dplyr’:
   intersect, select, ungroup, union
The following object is masked from ‘package:rmr2’:
   gather
The following object is masked from ‘package:reshape2’:
    dcast
The following objects are masked from ‘package:base’:
    intersect, rbind, sample, union
阅读(3492) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~