centos7 r语言安装_CentOS7下安装所有的R包|Install all R packages in CentOS7

本文详细介绍了如何在CentOS7服务器上安装所有R包,包括更新系统、添加repo、安装依赖库以及使用R的devtools安装GitHub上的包,确保用户可以顺利进行R语言云计算服务。
摘要由CSDN通过智能技术生成

为了做R语言云计算服务,需要给服务器安装所有的R包,这样一来用户就不用担心安装和编译各种包的时候出现问题了。

打个小广告:一个月仅15元的R语言云计算服务

首先更新系统:

yum update -y

添加jag repo

vi /etc/yum.repos.d/jags.repo

#写入

[home_cornell_vrdc]

name=Sundry packages for scientific computing (CentOS_7)

type=rpm-md

baseurl=http://download.opensuse.org/repositories/home:/cornell_vrdc/CentOS_7/

gpgcheck=1

gpgkey=http://download.opensuse.org/repositories/home:/cornell_vrdc/CentOS_7//repodata/repomd.xml.key

enabled=1

给系统安装所有需要的Lib:

yum groups mark convert

yum install epel-release -y

yum groupinstall “Development tools” -y

yum install wget openblas java-1.8.0-openjdk-devel zlib-devel libicu-devel libpng-devel libcurl-devel libxml2-devel openssl-devel openmpi-devel numpy python-matplotlib netcdf4-python netcdf-devel netcdf python-pandas python-basemap proj-epsg proj-devel gdal-devel monitorix gnuplot ImageMagick librsvg2-devel libsodium-devel libwebp-devel cairo-devel hunspell-devel openssl-devel poppler-cpp-devel protobuf-devel mariadb-devel mysql-devel v8-devel redland-devel cyrus-sasl-devel libtiff-devel tcl-devel tk-devel xauth mesa-libGLU-devel glpk-devel libXt-devel gsl-devel fftw-devel bzip2-devel geos-devel gtk2-devel gtk3-devel libjpeg-turbo-devel jags4-devel bwidget blas-devel lapack-devel mpfr-devel unixODBC-devel libsndfile-devel udunits2-devel postgresql-devel libRmath-devel qt-devel libdb-devel octave-devel hiredis-devel poppler-glib-devel QuantLib-devel boost-devel czmq-devel ImageMagick-c++-devel file-devel opencl-headers gdal gdal-devel proj proj-devel proj-nad proj-epsg openssl-devel libcurl-devel postgresql-devel udunits2-devel libxml2-devel geos-devel libjpeg-turbo-devel libpng-devel udunits2-devel screen glpk-devel cairo-devel mesa-libGL-devel mesa-libGLU-devel freeglut-devel -y

#安装gdal2.0

wget http://s3.amazonaws.com/etc-data.koordinates.com/gdal-travisci/install-libkml-r864-64bit.tar.gz

tar xzf install-libkml-r864-64bit.tar.gz

sudo cp -r install-libkml/include/* /usr/local/include

sudo cp -r install-libkml/lib/* /usr/local/lib

sudo ldconfig

wget http://download.osgeo.org/gdal/2.2.3/gdal-2.2.3.tar.gz

tar xzf gdal-2.2.3.tar.gz

cd gdal-2.2.3

./configure –with-libkml

make

make install

cd ..

cp /usr/local/lib/* /usr/lib64/

#安装gsl

wget ftp://ftp.gnu.org/gnu/gsl/gsl-latest.tar.gz

tar xzf gsl-latest.tar.gz

cd gsl*

./configure –prefix=/usr

make

make install

cd ..

#安装R

yum install R -y

#替换openBLAS

mv /usr/lib64/R/lib/libRblas.so /usr/lib64/R/lib/libRblas.so_

ln -s /usr/lib64/libopenblas.so.0 /usr/lib64/R/lib/libRblas.so

#设置java环境

env PATH=/usr/local/bin:$PATH R CMD javareconf

#设置openMPI

sudo echo “/usr/lib64/openmpi/lib” > /etc/ld.so.conf.d/openmpi.conf

sudo ldconfig

#安装ggobi

wget http://www.ggobi.org/downloads/ggobi-2.1.11.tar.bz2

bunzip2 ggobi-2.1.11.tar.bz2

tar -xf ggobi-2.1.11.tar

cd ggobi-2.1.11

./configure –with-all-plugins

make

sudo make install

make ggobirc

sudo mkdir -p /etc/xdg/ggobi

sudo cp ggobirc /etc/xdg/ggobi/ggobirc

sudo ln -s /usr/local/lib/libggobi.so.0 /usr/lib64/libggobi.so.0

cd ..

#安装OpenCL

wget http://registrationcenter-download.intel.com/akdlm/irc_nas/9019/opencl_runtime_16.1.1_x64_rh_6.4.0.25.tgz

tar -xzf opencl_runtime_16.1.1_x64_rh_6.4.0.25.tgz

sudo yum install opencl_runtime_16.1.1_x64_rh_6.4.0.25/rpm/*

#安装SYMPHONY

wget http://www.coin-or.org/download/source/SYMPHONY/SYMPHONY-5.6.14.tgz

tar -xzf SYMPHONY-5.6.14.tgz

cd SYMPHONY-5.6.14

./configure

make

sudo make install

sudo cp -R include/* /usr/include/

sudo cp -R bin/* /usr/bin/

sudo cp -R lib/* /usr/lib64/

sudo cp -R share/* /usr/share/

cd ..

#如果需要显卡支持的话要安装CUDA

#https://developer.nvidia.com/cuda-downloads

#vi /etc/profile.d/custom.sh

#写入

#export CPATH=\$CPATH:/usr/include/openmpi-x86_64

#PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/

#export PATH=/usr/local/cuda-8.0/bin${PATH:+:${PATH}}

#export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64:${LD_LIBRARY_PATH}

开始安装Packages

install.packages(‘devtools’)

library(devtools)

devtools::install_github(‘imanuelcostigan/RSQLServer’)

source(“https://bioconductor.org/biocLite.R”

bbf4aa0f3b5c09d889c73968d4238164.gif

biocLite(c(“DNAcopy”, “SAGx”, “aroma.light”, “aroma.core”, “genefilter”, “limma”, “DESeq”, “graph”, “Rgraphviz”, “genefilter”, “edgeR”, “RDAVIDWebService”, “sva”, “fabia”, “beadarray”, “geneplotter”, “biomaRt”, “Biostrings”, “GOSemSim”, “qvalue”, “DESeq2”, “marray”, “GEOquery”, “GenomicRanges”, “GenomeInfoDb”, “pcaMethods”, “chopsticks”, “RBGL”, “BSgenome”, “BSgenome.Hsapiens.UCSC.hg19”, “affxparser”, “affy”, “oligo”, “supraHex”, “siggenes”, “gcrma”, “Rsamtools”, “GenomicAlignments”, “impute”, “flowWorkspace”, “flowCore”, “breastCancerVDX”, “snpStats”, “EBImage”, “rtracklayer”, “GenomicFeatures”, “genoset”, “nem”, “a4Core”, “Icens”, “lfa”, “org.Hs.eg.db”, “GOstats”, “pdInfoBuilder”, “convert”, “GEOmetadb”, “annotate”, “simpleaffy”, “lumi”, “globaltest”, “ssize”, “GeneMeta”, “MergeMaid”, “metaArray”, “seqLogo”, “GlobalAncova”, “GSVA”, “mzR”, “xcms”, “vsn”, “minet”, “ShortRead”, “safe”, “piano”, “LBE”, “survcomp”, “fmcsR”, “ChemmineR”, “KEGGREST”, “widgetTools”, “copynumber”, “phyloseq”, “MassSpecWavelet”, “MAIT”, “CNTools”, “qpgraph”, “topGO”, “kelvin”, “miscF”, “randtoolbox”, “mcGlobaloptim”, “ycinterextra”, “DiceOptim”, “GPareto”, “KrigInv”, “bamsignals”, “Rdisop”, “KEGGgraph”, “VariantAnnotation”, “iBBiG”, “rqubic”, “BicARE”, “CMA”, “affyPLM”))

install.packages(‘tcltk2’)

install.packages(‘udunits2′,configure.args=’–with-udunits2-include=/usr/include/udunits2′)

install.packages(‘Rmpi’,configure.args = ‘–with-Rmpi-include=/usr/include/openmpi-x86_64 –with-Rmpi-libpath=/usr/lib64/openmpi/lib –with-Rmpi-type=OPENMPI’)

availablePackages

This article is under CC BY-NC-SA 4.0 license.

Please quote the original link:https://www.liujason.com/article/262.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值