在使用Yonghong Z-suite深度分析之前,需要安装启用Rserve。具体的安装启用方法如下:
安装步骤:
1. 下载R-3.3.2.tar.gz
2. 解压为R-3.3.2,tar -xzvf R-3.3.2.tar.gz
3. 添加依赖包:
yum install -y gcc
yum install -y gcc-c++
yum install gcc-gfortran
yum install -y glibc-headers
yum install -y readline-devel
yum install -y wget libXt-devel
yum install -y fonts-chinese tcl tcl-devel tclx tk tk-devel
yum install -y mesa-libGLU mesa-libGLU-devel
yum install -y install bzip2-devel
yum install -y install xz-devel.x86_64
yum install -y install pcre-devel
yum install -y install libcurl
yum install -y install libcurl-devel
yum install -y texinfo.x86_64
yum install -y texlive-pdftex-doc.noarch
yum install -y texlive
yum install -y openssl-devel
yum install -y libxml2
yum install cairo-devel.x86_64
4. 进入R-3.3.2目录,然后安装
./configure --enable-R-shlib=yes --with-tcltk --prefix=/home/R
其中 --prefix为准备安装R的地址,此时为R文件夹。
5. make和安装
make
make install
6. 配置环境变量
编辑变量:vim /etc/profile
添加变量:export R_HOME=/usr/local/R/lib64/R
export PATH=$PATHR_HOME/bin
使环境变量生效:source /etc/profile
7. xshell中输入R进入R的控制台。
8. 安装R语言包:
install.packages("flexclust")
install.packages("Rserve")
install.packages("rpart.plot")
install.packages("Cairo")
install.packages("arules")
install.packages("arulesViz", dependencies=TRUE, INSTALL_opts = c('--no-lock'))
install.packages("glmnet")
install.packages("forecast")
9. 关闭防火墙:systemctl stop firewalld.service
10. 启动RServe(允许远程):
R CMD Rserve --RS-enable-remote
相关的报错的解决办法见链接:
https://blog.csdn.net/wumiqing1/article/details/54232345
欢迎光临 永洪社区 (https://club.yonghongtech.com/) | Powered by Discuz! X3.4 |