RHEL6.5(Red Hat Enterprise Linux)全新安装R

公司服务器才用了RHEL操作系统,虚拟机上也安装了一个相同版本,用于相关工作的研究。

1,安装R首先配置yum

RHEL的yum是需要收费的,所以需要删除预安装的服务,重新配置:

删除:rpm -aq|grep yum|xargs rpm -e --nodeps 


下载 :wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-3.2.29-81.el6.centos.noarch.rpm
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-40.el6.noarch.rpm
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm  
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/python-urlgrabber-3.9.1-11.el6.noarch.rpm 


安装:

rpm -ivh python-iniparse-0.3.1-2.1.el6.noarch.rpm
rpm -ivh yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
rpm -ivh python-urlgrabber-3.9.1-11.el6.noarch.rpm  
rpm -ivh yum-3.2.29-81.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-40.el6.noarch.rpm

需要预先删除urlgrabber:

rpm -qa |grep urlgrabber
rpm -e python-urlgrabber-3.9.1-8.el6.noarch

到http://mirrors.163.com的 centos帮助文档 中下载CentOS6-Base-163.repo文件,存放到/etc/yum.repos.d中

#wget http://mirrors.163.com/.help/CentOS6-Base-163.repo

改名为:CentOS6-Base.repo

然后把文件里的$releasever都改为你的Linux版本(6或者5),也就是文件修改成如下即可:

: ?/$releasever/6/g 

yum clean all 清除原有缓存

yum makecache  获取yum列表


配置完成后最好升级下所有的包,避免安装R的时候报错:yum -y upgrade


2,安装R


In order to get R running on RHEL 6, we’ll need to add an additional repository that allows us to install the new packages, EPEL. Extra Packages for Enterprise Linux (or EPEL) is a Fedora Special Interest Group that creates, maintains, and manages a high quality set of additional packages for Enterprise Linux, including, but not limited to, Red Hat Enterprise Linux (RHEL), CentOS and Scientific Linux (SL).


su -c 'rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm'

如果上一步怕麻烦没有升级所有包,只升级 curl和 nss即可,至少在我的虚拟机里面可以:

sudo yum update

sudo yum install R

查看R包:

yum list R-\*

你可能感兴趣的:(Linux,red,hat,操作系统,rhel,yum,rpm)