方式一 源码编译安装
1、安装依赖
[root@hadoop102 ~]# yum install -y gcc gcc-c++ \
gcc-gfortran binutils libXt-devel \
zlib-devel xz-devel pcre-devel bzip2-devel
2、安装curl-7.62.0
## 下载地址
https://github.com/curl/curl/releases[root@hadoop102 software]# tar -xzvf curl-7.62.0.tar.gz -C ../module
[root@hadoop102 software]# cd ../module/curl-7.62.0
[root@hadoop102 curl-7.62.0]# ./configure
[root@hadoop102 curl-7.62.0]# make && make install
[root@hadoop102 curl-7.62.0]# curl --version
3、安装 R
## 下载地址
https://cran.r-project.org/[root@hadoop102 software]# tar -xzvf R-3.6.0.tar.gz -C ../module
[root@hadoop102 software]# cd ../module/R-3.6.0
[root@hadoop102 R-3.6.0]# ./configure
[root@hadoop102 R-3.6.0]# make && make install
[root@hadoop102 R-3.6.0]# R --version
方式二 yum安装
1、替换Cemtos7 yum国内镜像
[root@hadoop102 ~]# wget -O /etc/yum.repos.d/CentOS-Base.repo \
http://mirrors.aliyun.com/repo/Centos-7.repo
2、安装epel仓
[root@hadoop102 ~]# yum install epel-release
3、安装R语言
[root@hadoop102 ~]# yum install R
方式三 离线安装rpm包
[root@hadoop102 ~]# rpm -ivh --nodeps libRmath-3.6.0-1.el7.x86_64.rpm
[root@hadoop102 ~]# rpm -ivh --nodeps libRmath-devel-3.6.0-1.el7.x86_64.rpm
[root@hadoop102 ~]# rpm -ivh --nodeps openblas-Rblas-0.3.3-2.el7.x86_64.rpm
[root@hadoop102 ~]# rpm -ivh --nodeps R-3.6.0-1.el7.x86_64.rpm
[root@hadoop102 ~]# rpm -ivh --nodeps R-core-3.6.0-1.el7.x86_64.rpm
[root@hadoop102 ~]# rpm -ivh --nodeps R-core-devel-3.6.0-1.el7.x86_64.rpm
[root@hadoop102 ~]# rpm -ivh --nodeps R-devel-3.6.0-1.el7.x86_64.rpm
[root@hadoop102 ~]# rpm -ivh --nodeps R-java-3.6.0-1.el7.x86_64.rpm
[root@hadoop102 ~]# rpm -ivh --nodeps R-java-devel-3.6.0-1.el7.x86_64.rpm
[root@hadoop102 ~]# rpm -ivh --nodeps tre-0.8.0-18.20140228gitc2f5d13.el7.x86_64.rpm
[root@hadoop102 ~]# rpm -ivh --nodeps tre-common-0.8.0-18.20140228gitc2f5d13.el7.noarch.rpm
[root@hadoop102 ~]# rpm -ivh --nodeps tre-devel-0.8.0-18.20140228gitc2f5d13.el7.x86_64.rpm
方式四 - 局域网内yum安装
1、替换Cemtos7 yum本地镜像
[root@hadoop102 yum.repos.d]# vim CentOS-Base.repo
[local]
name=local-hadoop102
baseurl=http://192.168.2.102/packages
gpgcheck=1
enabled=1
2、安装epel仓
[root@hadoop102 ~]# yum install epel-release
3、安装R语言
[root@hadoop102 ~]# yum install R