john pfeiffer
  • Home
  • Categories
  • Tags
  • Archives

Postgresql install intro

echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" > /etc/apt/sources.list.d/pgdg.list

wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - apt-get update

apt-get install postgresql-9.3

ps aux | grep postgres # it has started already sudo -u postgres createuser -s $USER # e.g. $USER=ubuntu createdb mydb # dropdb mydb # to delete the database

psql mydb # start the interactive client to access the database

pgsql normal user prompt mydb=>

pgsql super user prompt mydb

\l or \list # all the current databases \d or \dt # tables in the current database

http://www.linuxscrew.com/2009/07/03/postgresql-show-tables-show-databases-show-columns/ http://killtheyak.com/use-postgresql-with-django-flask/


  • « twisted trial test single file tempfile remove
  • s3 boto cumulus compatible create bucket callingformat »

Published

Apr 21, 2014

Category

linux

~80 words

Tags

  • install 58
  • intro 9
  • linux 249
  • postgresql 1