Skip to content

Instantly share code, notes, and snippets.

@Dulani
Last active July 11, 2023 20:28
Show Gist options
  • Save Dulani/0279f33148bde7247a05 to your computer and use it in GitHub Desktop.
Save Dulani/0279f33148bde7247a05 to your computer and use it in GitHub Desktop.
Installing R Studio Server on an Amazon Linux (Redhat) AMI

Installing R Studio Server on an Amazon Linux (Redhat) AMI

  • Drawn mostly from: http://www.rstudio.com/products/rstudio/download-server/

  • ssh into the instance.

  • Install any outstanding updates
    sudo yum update

  • Install R:
    sudo yum install R

  • Install openSSL (not sure if the Linux AMI's require this, but it probably doesn't hurt.
    sudo yum install openssl098e # Required only for RedHat/CentOS 6 and 7

  • Donwload and install the package
    wget http://download2.rstudio.org/rstudio-server-0.98.1103-x86_64.rpm
    sudo yum install --nogpgcheck rstudio-server-0.98.1103-x86_64.rpm

  • Create a user and assign a password
    sudo useradd <username>
    sudo passwd <username>
    (assign password at the prompt)

  • Use a browser to navigate to the machine's public DNS name on port 8787 (must have already enabled traffic on 8787 via the AWS security groups. This is usually done when configuring the VM.)
    Example: http://ec2-54-86-121-122.compute-1.amazonaws.com:8787

  • Login using the username and credentials created above.

###Optional step: The port that RStudio Server listens on can be changed by adding www-port=80 to this file: /etc/rstudio/rserver.conf

Also, to install the RCurl package on an Amazon Linux AMI, the curl-devel package needs to be installed: sudo yum install curl-devel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment