Centos7下Rstudio-service配置教程

Centos7下Rstudio-service配置教程

官方下载地址:https://posit.co/download/rstudio-server/

root账号安装:

wget https://download2.rstudio.org/server/centos7/x86_64/rstudio-server-rhel-2022.07.2-576-x86_64.rpm
sudo yum install rstudio-server-rhel-2022.07.2-576-x86_64.rpm

启动R 服务:

rstudio-server start #启动RStudio
rstudio-server status #查看RStudio状态



设置使用的R版本:

 vi /etc/rstudio/rserver.conf
#设置内容如下:
# Server Configuration File
rsession-which-r=/share/work/biosoft/R/R-v4.0.3/bin/R rsession-ld-library-path=/share/work/biosoft/gcc/gcc-v6.4.0/lib64/:/usr/lib:/usr/lib64:/share/work/biosoft/bamtools/bamtools-v2.4.0/lib/:/share/work/biosoft/gcc/gcc-v6.4.0/lib64/:/share/work/biosoft/gcc/gcc-v6.4.0/lib/:/share/work/biosoft/boost/boost.1.64/lib/:/share/work/biosoft/lib/atlas/:/share/work/biosoft/lib:/share/work/biosoft/Root/root/lib/:/share/work/biosoft/gsl/gsl-2.1/lib/:/share/work/biosoft/gcc/gcc-v4.7.3/lib64/:/share/work/biosoft/R/R-v3.5.0/bin/:/share/work/biosoft/gcc/gcc-v6.4.0/lib64/:/share/work/biosoft/mpc/mpc-v1.0.2/lib/:/share/work/biosoft/cufflinks/samtools-0.1.18/htslib-1.3.2/htslib:/share/work/biosoft/samtools/htslib/:/share/work/biosoft/lib/atlas/:/share/work/biosoft/lib:/share/work/biosoft/Root/root/lib/:/share/work/biosoft/gsl/gsl-2.1/lib/:/share/work/biosoft/gcc/gcc-v4.7.3/lib64/:/share/work/biosoft/zlib/lib/:/share/work/biosoft/boost/boost.1.50/lib:/share/work/biosoft/xz/xz-v5.2.3/lib:/opt/gridengine/lib/lx-amd64:/opt/openmpi/lib


网页访问,默认端口为8787



attachments-2021-01-MB2GHMcD5ff43a29125c1.png



#如果启动报错,可能是centos系统selinux防火墙导致;

2022-09-29T02:51:45.397167Z [rserver] ERROR Error reading R script (/share/work/biosoft/R/R-v4.2.1/bin/R), system error 2 (No such file or directory); LOGGED FROM: bool rstudio::core::r_util::{anonymous}::detectRLocationsUsingScript(const rstudio::core::FilePath&, rstudio::core::FilePath*, rstudio::core::FilePath*, rstudio::core::config_utils::Variables*, std::__cxx11::string*, const string&) src/cpp/core/r_util/REnvironmentPosix.cpp:426


attachments-2022-09-XEGtS8wf63350b842f7c1.png


设置一下即可解决,端口开通

sudo firewall-cmd --query-port=8787/tcp
sudo firewall-cmd --zone=public --add-port=8787/tcp --permanent
sudo firewall-cmd --reload 
sudo firewall-cmd --zone=public --list-ports
#selinux设置
setenforce 0




  • 发表于 2021-01-05 18:07
  • 阅读 ( 2126 )
  • 分类:R

0 条评论

请先 登录 后评论
omicsgene
omicsgene

生物信息

702 篇文章

作家榜 »

  1. omicsgene 702 文章
  2. 安生水 351 文章
  3. Daitoue 167 文章
  4. 生物女学霸 120 文章
  5. xun 82 文章
  6. rzx 78 文章
  7. 红橙子 78 文章
  8. CORNERSTONE 72 文章