Home > Database > Mysql Tutorial > linux系统安装RRHive

linux系统安装RRHive

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-07 15:29:11
Original
1515 people have browsed it

安装R 1 下载R安装包 wget http://ftp.ctex.org/mirrors/CRAN/src/base/R-2/R-2.15.0.tar.gz . 2 安装R ./configure --with-readline=yes --with-x=yes --enable-R-shlib --prefix /home/work/R(--prefix是关键,R是自建文件夹) make make install 3 配置

安装R
1 下载R安装包
wget http://ftp.ctex.org/mirrors/CRAN/src/base/R-2/R-2.15.0.tar.gz .

2 安装R
./configure --with-readline=yes --with-x=yes --enable-R-shlib --prefix /home/work/R(--prefix是关键,R是自建文件夹)
make
make install

3 配置环境变量
配置环境变量(在自己的工作目录下,比如:/home/work),命令如下: vi .bash_profile 打开文件后,在PATH=后再加 :${HOME}/R/bin

安装RHive

1 配置好JAVA的环境。检查一下环境变量HIVE_HOME。

2 下载rJava、Hive、Rserve安装包。

wget http://cran.at.r-project.org/src/contrib/Archive/rJava/rJava_0.9-3.tar.gz .
wget http://cran.at.r-project.org/src/contrib/Archive/Rserve/Rserve_0.6-8.tar.gz .
wget http://cran.at.r-project.org/src/contrib/Archive/RHive/RHive_0.0-7.tar.gz .

3 安装rJava、Hive、Rserve()。
R CMD INSTALL rJava_0.9-3.tar.gz
R CMD INSTALL Rserve_0.6-8.tar.gz
R CMD INSTALL RHive_0.0-7.tar.gz

测试

1 选定一个目录作为工作目录。

2 执行python -m SimpleHTTPServer,把当前目录设为HTTP服务目录,可以通过http://localhost:8000访问。

3 另开一个shell窗口,命令行输入R进入R环境。

4 执行代码: 
capabilities() #未安装X11,则只有pdf可用
pdf()
dev.list()
plot(c(1,2,4), c(3,4,5))
q() #只有退出后,结果pdf文件才可用
Copy after login
5 打开浏览器http://localhost:8000,可以打开Rplots.pdf了。

6 重启R,执行代码:

library(RHive) #可以看到RHive已经安装好了
载入需要的程辑包:rJava
载入需要的程辑包:Rserve
This is RHive 0.0-7. For overview type ‘?RHive’.
HIVE_HOME=/home/work/qe-1.6/qe_rpoff/queryengine
call rhive.init() because HIVE_HOME is set.
#连hive还木有搞定,待续
Copy after login
Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template