Skip to content

Commit

Permalink
Add notes about setting up vagrant
Browse files Browse the repository at this point in the history
  • Loading branch information
hadley committed Jan 8, 2014
1 parent 320061b commit 3df5fa7
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions vignettes/vagrant-setup.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<!--
%\VignetteEngine{knitr}
%\VignetteIndexEntry{Vagrant setup}
-->

# Vagrant set up

Run this code to set up databases on vagrant vm.
https://gist.github.com/trestletech/b5babf76487fa6c898b2

```
# Install needed apt packages
sudo apt-get install postgresql libpq-dev
sudo apt-get install mysql-server libmysqlclient-dev
# Set up database users
sudo su -
sudo -u postgres createuser --superuser Ruser
sudo -u postgres psql
\password Ruser
# press enter twice
# Ctrl + D
mysql -u root -p -e "CREATE DATABASE lahman;"
mysql -u root -p -e "CREATE DATABASE hflights;"
mysql -u root -p -e "CREATE DATABASE test;"
sudo -u postgres createdb lahman
sudo -u postgres createdb hflights
sudo -u postgres createdb test
# Ctrl + D
R
install.packages(c("RPostgreSQL", "RMySQL"))
# Ctrl + D
library(dplyr)
lahman_mysql()
lahman_postgres()
hflights_postgres()
```

0 comments on commit 3df5fa7

Please sign in to comment.