【问题标题】:launching R in AWS EC2在 AWS EC2 中启动 R
【发布时间】:2020-04-28 03:09:33
【问题描述】:

我正在尝试在 AWS EC2 中启动一个 R 实例。我选择了免费套餐并使用 Amazon Linux AMI。在用户数据中我指定了以下方式来安装 R 和 Rstudio:

    #!/bin/bash
    # install R
    yum install -y R
    # install RStudio-Server
    wget https://download2.rstudio.org/server/centos6/x86_64/rstudio-server-rhel-1.2.5033- 
    x86_64.rpm
    yum install -y --nogpgcheck rstudio-server-rhel-1.2.5033-x86_64.rpm
    yum install -y curl-devel
    yum install -y openssl openssl-devel
    # add user
    useradd forecasting
    echo forecasting:testing | chpasswd

但是,R 版本不是最新版本 - 我如何修改此代码以下载最新版本的 R?

【问题讨论】:

标签: r linux amazon-web-services amazon-ec2


【解决方案1】:

使用installing R for RStudio link 中的说明,我认为以下内容可能适用于 Centos 6。不幸的是,我无法检查它,但它可能会给你一些工作。

#!/bin/bash
# install R runtime dependencies
yum install epel-release
# set R version
R_VERSION=3.6.2
# download and install R
wget https://cdn.rstudio.com/r/centos-6/pkgs/R-${R_VERSION}-1-1.x86_64.rpm
yum install -y R-${R_VERSION}-1-1.x86_64.rpm
# install RStudio-Server
wget https://download2.rstudio.org/server/centos6/x86_64/rstudio-server-rhel-1.2.5033- 
x86_64.rpm
yum install -y --nogpgcheck rstudio-server-rhel-1.2.5033-x86_64.rpm
yum install -y curl-devel
yum install -y openssl openssl-devel
# add user
useradd forecasting
echo forecasting:testing | chpasswd

【讨论】:

    猜你喜欢
    • 2017-12-17
    • 2016-12-29
    • 2023-04-05
    • 2023-03-14
    • 1970-01-01
    • 2019-09-16
    • 2021-05-12
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多