Last active
October 6, 2016 09:39
-
-
Save mjadkins/86ed8114b889255db7da78a7ec013add to your computer and use it in GitHub Desktop.
R and RSTAN on Amazon Web Services Elastic Cloud Computing (EC2) using Ubuntu Linux Server - October 2016
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # In your terminal navigate to key pair | |
| cd <your directory> | |
| # Connect to the server via Secure Shell (SSH) | |
| ssh -i YOUR_KEYPAIR.pem.txt ubuntu@PUBLIC_DNS | |
| # You may get an error so you will need to modify the key | |
| chmod 600 YOUR_KEYPAIR.pem.txt | |
| # Connect to the server via Secure Shell (SSH) | |
| ssh -i YOUR_KEYPAIR.pem.txt ubuntu@PUBLIC_DNS | |
| # Update Ubuntu | |
| sudo apt-get update | |
| # Install gcc and clang C++ compilers | |
| sudo apt-get install gcc | |
| sudo apt-get install clang | |
| #Install libcurl4 | |
| sudo apt-get install libcurl4-openssl-dev | |
| # Update Ubuntu again | |
| sudo apt-get update | |
| # Ubuntu tends to install an earlier version of base R, so this forces installing the latest version | |
| sudo sh -c 'echo "deb http://cran.rstudio.com/bin/linux/ubuntu trusty/" >> /etc/apt/sources.list' | |
| gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9 | |
| gpg -a --export E084DAB9 | sudo apt-key add - | |
| sudo apt-get update | |
| sudo apt-get -y install r-base | |
| sudo apt-get install r-cran-rjava | |
| # Call R | |
| R | |
| # Install ggplot2 and install RSTAN | |
| install.packages("ggplot2") | |
| install.packages("rstan") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment