In this section, we will run RStudio Server on a remote Amazon machine. This will require starting up an instance, configuring its network firewall, and installing and running some software.
Reference documentation for running RStudio Server on Ubuntu:
https://www.rstudio.com/products/rstudio/download-server/
Start an ami-05384865 on an m4.xlarge machine, as per the instructions here:
Normally, Amazon computers only allow shell logins via ssh. Since we want to run a Web service, we need to give the outside world access to other network locations on the computer.
Follow these instructions:
(You can do this while the computer is booting.)
Follow these instructions to log in via the shell:
Amazon Web Services computers normally require a key (the .pem file) instead of a login password, but RStudio Server will need us to log in with a password. So we need to configure a password for the account we're going to use (which is 'ubuntu')
Create a password like so:
sudo passwd ubuntu
and set it to something you'll remember.
Update the software catalog and install a few things:
sudo apt-get update && sudo apt-get -y install gdebi-core r-base
This will take a few minutes.
wget https://download2.rstudio.org/rstudio-server-0.99.891-amd64.deb sudo gdebi -n rstudio-server-0.99.891-amd64.deb
Upon success, you should see:
Mar 07 15:20:18 ip-172-31-6-68 systemd[1]: Starting RStudio Server... Mar 07 15:20:18 ip-172-31-6-68 systemd[1]: Started RStudio Server.
Finally, go to 'http://' + your hostname + ':8787' in a browser, eg.
http://ec2-XX-YY-33-165.us-west-1.compute.amazonaws.com:8787/
and log into RStudio with username 'ubuntu' and the password you set it to above.
Voila!
You can now just go ahead and use this, or you can "stop" it, or you can freeze into an AMI for later use.
Note that on reboot, RStudio Server will start up again and all your files will be there.
Go back to the index: :doc:`index`.