I figured I’d share getting setup on my Ubuntu machine.
sudo apt-get install postgresql
createdb book createuser: could not connect to database postgres: FATAL: role "myusername" does not exist
The bit above can be resolved with the following (replacing myusername for yours)
sudo -u postgres createuser myusername Shall the new role be a superuser? (y/n) y
Then this should work
Installing Extensions There should be more problems when trying to create the 5 extensions
psql book -c "CREATE EXTENSION tablefunc" ERROR: could not open extension control file "/usr/share/postgresql/9.1/extension/tablefunc.control": No such file or directory
You can fix it by just downloading a package.
sudo apt-get install postgresql-contrib
Downloading the postgresql-contrib packages will give the ability to use the following five commands:
psql book -c "CREATE EXTENSION tablefunc" psql book -c "CREATE EXTENSION fuzzystrmatch" psql book -c "CREATE EXTENSION pg_trgm" psql book -c "CREATE EXTENSION cube" psql book -c "CREATE EXTENSION dict_xsyn"
And now you should be good to go!
Thanks to the post by Tanner Watson for the CREATE EXTENSION command