安装R以及Rserve

安装R

yum install gcc

yum install gcc-c++

yum install gcc-gfortran

yum install readline-devel

yum install libXt-devel

 

wget --no-check-certificate https://cran.r-project.org/src/base/R-3/R-3.1.2.tar.gz

tar -zxvf   R-3.1.2.tar.gz

 

cd R-3.1.2

./configure  --enable-R-shlib --prefix=/usr/R-3.1.2

make

make install

 

vi /etc/profile  增加如下内容:

export PATH=/usr/R-3.2.2/bin:$PATH

 

保存后执行:

.  /etc/profile


 安装依赖包

执行命令如下:

R

install.packages("Rserve")

install.packages("xts")

install.packages("PerformanceAnalytics")

install.packages("plyr")

install.packages("Hmisc")

install.packages("RJDBC")

 

quit()


配置和启动 Rserve

vi /etc/Rserv.conf  增加如下内容:

remote enable

workdir /tmp/Rserv

auth disable

plaintext enable

fileio enable

port 6311

encoding utf8

 

启动Rserve

R CMD Rserve




你可能感兴趣的:(安装R以及Rserve)