-
VPC
- Public subnet
- Route table:
--> add 0.0.0.0/0 to IGW
- Route table:
- IGW
- Public subnet
-
EC2 instance (AMI Amazon Linux 2: based on CentOS 6/7)
-
SG
- By default R-Studio Server runs on port 8787 :
--> Allow TCP 8787 from 0.0.0.0/0
- By default R-Studio Server runs on port 8787 :
-
Elastic IP (at least Public IP attached to instance)
-
Connect in ssh to instance:
ssh -i key.pem ec2-user@<Public-IP>RStudio Server requires RedHat or CentOS version 6 (or higher) as well as an installation of R
sudo amazon-linux-extras install R3.4should have been (but doesn't work on this AMI gives code above to install R)
sudo yum install -y R instructions for installing R-Studio Server:
https://rstudio.com/products/rstudio/download-server/redhat-centos/
wget https://download2.rstudio.org/server/centos6/x86_64/rstudio-server-rhel-1.2.5019-x86_64.rpm
sudo yum install rstudio-server-rhel-1.2.5019-x86_64.rpmCheck installation (should return nothing...)
sudo rstudio-server verify-installationsudo rstudio-server startsudo useradd username
echo username:password | sudo chpasswd
or
sudo passwd usernamein browser: (using user and password set previously)
<Public-IP>:8787
Do not forget -y in command line (confirms automatically)
#!/bin/bash
# R-Studio Server Install script
# Update yum
sudo yum update -y
# Install R
sudo amazon-linux-extras install R3.4 -y
# Install R-Studio Server
wget https://download2.rstudio.org/server/centos6/x86_64/rstudio-server-rhel-1.2.5019-x86_64.rpm
sudo yum -y install rstudio-server-rhel-1.2.5019-x86_64.rpm
# Start R-Studio
sudo rstudio-server start
# Add username and password
sudo useradd username
echo username:password | sudo chpasswd
Useful extra AWS instructions:
https://aws.amazon.com/fr/blogs/big-data/running-r-on-aws/



