Forked from jschoolcraft/how-to-install-postgresql-on-an-ubuntu-1004-vagrant-box.markdown
Created
December 12, 2013 12:11
-
-
Save syntaxsugar/7927095 to your computer and use it in GitHub Desktop.
Revisions
-
Sean Hammond revised this gist
Mar 1, 2012 . 1 changed file with 0 additions and 3 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,3 @@ Here's how to install PostgreSQL and have it run automatically at startup, on an Ubuntu 10.04 virtual machine using [Vagrant](http://vagrantup.com/). This took me a while to figure out: -
Sean Hammond renamed this gist
Mar 1, 2012 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
Sean Hammond revised this gist
Mar 1, 2012 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -30,8 +30,8 @@ Blog](http://blog.crowdint.com/2011/08/11/postgresql-in-vagrant.html)). Edit export LANG=en_US.UTF-8 export LC_ALL=en_US.UTF-8 vagrant@lucid32> sudo locale-gen en_US.UTF-8 vagrant@lucid32> sudo dpkg-reconfigure locales Disconnect from your virtual machine (ctrl-d) then connect again: -
Sean Hammond revised this gist
Mar 1, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -21,7 +21,7 @@ Now make a new lucid32 virtual machine and install postgresql on it: Now you need to fix your locale settings (thanks, [Crowd Interactive Tech Blog](http://blog.crowdint.com/2011/08/11/postgresql-in-vagrant.html)). Edit `/etc/bash.bashrc`: vagrant@lucid32> sudo nano /etc/bash.bashrc -
Sean Hammond revised this gist
Mar 1, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ How to install PostgreSQL on an Ubuntu 10.04 Vagrant box -------------------------------------------------------- Here's how to install PostgreSQL and have it run automatically at startup, on an Ubuntu 10.04 virtual machine using [Vagrant](http://vagrantup.com/). This -
Sean Hammond revised this gist
Mar 1, 2012 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,5 @@ How to install PostgreSQL on an Ubuntu 10.04 Vagrant box ======================================================== Here's how to install PostgreSQL and have it run automatically at startup, on an Ubuntu 10.04 virtual machine using [Vagrant](http://vagrantup.com/). This -
Sean Hammond renamed this gist
Mar 1, 2012 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
Sean Hammond renamed this gist
Mar 1, 2012 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
Sean Hammond renamed this gist
Mar 1, 2012 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
Sean Hammond renamed this gist
Mar 1, 2012 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
Sean Hammond revised this gist
Mar 1, 2012 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ How to install PostgreSQL on an Ubuntu 10.04 Vagrant box Here's how to install PostgreSQL and have it run automatically at startup, on an Ubuntu 10.04 virtual machine using [Vagrant](http://vagrantup.com/). This took me a while to figure out: Add the default lucid32 base box to your vagrant, if you haven't already: -
Sean Hammond revised this gist
Mar 1, 2012 . 1 changed file with 9 additions and 4 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,8 @@ How to install PostgreSQL on an Ubuntu 10.04 Vagrant box Here's how to install postgresql and have it run automatically at startup, on an Ubuntu 10.04 virtual machine using [vagrant](http://vagrantup.com/). This took me a while to figure out: Add the default lucid32 base box to your vagrant, if you haven't already: @@ -16,7 +18,9 @@ Now make a new lucid32 virtual machine and install postgresql on it: vagrant@lucid32> sudo aptitude update vagrant@lucid32> sudo aptitude install postgresql Now you need to fix your locale settings (thanks, [Crowd Interactive Tech Blog](http://blog.crowdint.com/2011/08/11/postgresql-in-vagrant.html)). Edit /etc/bash.bashrc: vagrant@lucid32> sudo nano /etc/bash.bashrc @@ -37,8 +41,9 @@ Disconnect from your virtual machine (ctrl-d) then connect again: You should see the list of databases output from psql. Now so you don't have to do it all again, disconnect from your virtual machine again and package it: host> vagrant halt host> vagrant package host> vagrant box add lucid32_with_postgresql package.box -
Sean Hammond created this gist
Mar 1, 2012 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,44 @@ How to install PostgreSQL on an Ubuntu 10.04 Vagrant box Here's how to install postgresql and have it run automatically at startup, on an Ubuntu 10.04 virtual machine using [vagrant](http://vagrantup.com/). This took me a while to figure out: Add the default lucid32 base box to your vagrant, if you haven't already: host> vagrant box add lucid32 http://files.vagrantup.com/lucid32.box Now make a new lucid32 virtual machine and install postgresql on it: host> mkdir mybox host> cd mybox host> vagrant init lucid32 host> vagrant up host> vagrant ssh vagrant@lucid32> sudo aptitude update vagrant@lucid32> sudo aptitude install postgresql Now you need to fix your locale settings (thanks, [Crowd Interactive Tech Blog](http://blog.crowdint.com/2011/08/11/postgresql-in-vagrant.html)). Edit /etc/bash.bashrc: vagrant@lucid32> sudo nano /etc/bash.bashrc # Add these lines to the bottom of the file: export LANGUAGE=en_US.UTF-8 export LANG=en_US.UTF-8 export LC_ALL=en_US.UTF-8 vagrant@lucid32> sudo locale-gen en_US.UTF-8 vagrant@lucid32> sudo dpkg-reconfigure locales Disconnect from your virtual machine (ctrl-d) then connect again: host> vagrant ssh vagrant@lucid32> sudo pg_createcluster 8.4 main --start vagrant@lucid32> sudo su root@lucid32> sudo -u postgres psql -l You should see the list of databases output from psql. Now so you don't have to do it all again, disconnect from your virtual machine again and package it: host> vagrant halt host> vagrant package host> vagrant box add lucid32_with_postgresql package.box