Last active
March 28, 2017 21:42
-
-
Save PolMine/39f191b4facb040f4ea74de3fbaf8dc3 to your computer and use it in GitHub Desktop.
Install RStudio Server and polmineR on amazon EC2
This file contains 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
After creating the Linux virtual machine on amazon EC2, the hard part was to set the Security Groups correctly to have port 8787 open, and to connect the newly defined Security Group to the instance. After that, everything ran smoothly as follows: | |
## Add CRAN mirror to sources.list, including key | |
```{sh} | |
sudo sh -c 'echo "deb http://cran.rstudio.com/bin/linux/ubuntu xenial/„ >> /etc/apt/sources.list' | |
gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9 | |
gpg -a --export E084DAB9 | sudo apt-key add - | |
``` | |
## install R | |
```{sh} | |
sudo apt-get update | |
sudo apt-get r-base | |
``` | |
## install apache webserver | |
```{sh} | |
sudo apt-get install apache2 apache2-doc | |
sudo /etc/init.d/apache2 start | |
``` | |
## install rstudio server | |
```{r} | |
sudo apt-get install gdebi-core | |
wget https://download2.rstudio.org/rstudio-server-1.0.136-amd64.deb | |
sudo gdebi rstudio-server-1.0.136-amd64.deb | |
``` | |
## create some user | |
```{sh} | |
useradd -m USERNAME | |
passwd USERNAME | |
``` | |
## install system requirements for rcqp package | |
```{sh} | |
sudo apt-get install bison | |
sudo apt-get install flex | |
sudo apt-get install libglib2.0-dev | |
apt-get install libpcre3 libpcre3-dev | |
sudo apt-get install libncurses5-dev libncursesw5-dev | |
``` | |
## optionally: install corpus workbench | |
```{sh} | |
sudo apt-get install subversion | |
svn export http://svn.code.sf.net/p/cwb/code/cwb/branches/3.0 cwb-3.0 | |
cd cwb | |
nano config.mk | |
# linux-64, standard installation (otherwise, things will be in a dir not on the path, cl.h will not be found) | |
make clean | |
make depend | |
make all | |
``` | |
## meet system requirements for devtools R package | |
```{sh} | |
sudo apt-get install libcurl4-openssl-dev | |
sudo apt-get install libssl-dev | |
sudo apt-get install libssh2-1-dev | |
``` | |
## install R packages | |
```{r} | |
install.packages(pkgs = c("RUnit", "devtools", "plyr", "tm")) | |
install.packages("rcqp") | |
install.packages("polmineR") | |
``` | |
## install corpus | |
```{r} | |
library(polmineR) | |
install.corpus("europarl.en", repo = "http://polmine.sowi.uni-due.de/packages") | |
``` | |
NOTE: There is a bug in the header file for CWB 3.4 - working with CWB 3.0 preferred | |
```{r} | |
devtools::install_github("PolMine/polmineR.Rcpp") | |
``` | |
```{r} | |
install.packages("ggplot2") | |
install.packages("xts") | |
install.packages("RColorBrewer") | |
install.packages("wordcloud") | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment