Strolch is a parameterized framework for use on servers and IoT
Go to file
Robert von Burg 6db4b5ddd0 [Project] added Jenkins build badge to README.md 2014-01-23 22:52:43 +01:00
src [New] added version info metadata to agent 2014-01-23 22:01:03 +01:00
.gitignore [New] Initial commit 2013-12-18 16:29:45 +01:00
LICENSE [New] Initial commit 2013-12-18 16:29:45 +01:00
README.md [Project] added Jenkins build badge to README.md 2014-01-23 22:52:43 +01:00
pom.xml [New] added version info metadata to agent 2014-01-23 22:01:03 +01:00

README.md

li.strolch.persistence.postgresql

Build Status

PostgreSQL Persistence Implementation for Strolch

Setup

  1. Install PostgreSQL version with at least version 9.1: $ sudo aptitude install postgresql postgresql-client

  2. Set a password for user 'postgres' $ sudo -u postgres psql postgres postgres=# \password postgres

  3. Create the user and DB: $ sudo su - postgres postgres=# create user testUser with password 'test'; postgres=# create database testdb; postgres=# GRANT ALL PRIVILEGES ON DATABASE testdb to testuser; postgres=# GRANT CONNECT ON DATABASE testdb TO testuser ;

  4. Added new component, setting properties for PostgreSQL DB: PersistenceHandler li.strolch.persistence.api.StrolchPersistenceHandler li.strolch.persistence.postgresql.PostgreSqlPersistenceHandler false <db.url>jdbc:postgresql://localhost/testdb</db.url> <db.username>testUser</db.username> <db.password>test</db.password>

  5. Create tables, or allow strolch to due it for you.

Appendix

  1. To drop the user and DB: postgres=# revoke ALL PRIVILEGES ON DATABASE testdb from testuser; postgres=# drop user testuser; postgres=# drop database testdb;
  2. Create a database: $ createdb -p 5432 -O drupal -U drupal -E UTF8 testingsiteone -T template0
  3. Dropping the database $ dropdb -p 5432 -U drupal testingsiteone
  4. Dumping the database pg_dump -p 5432 -h localhost -Fc -U drupal --no-owner testingsiteone > /tmp/testingsiteone_(date +"%Y-%m-%d_%s").pgdump
  5. Restoring the database $ pg_restore -p 5432 -h localhost -Fc -d testingsiteone -U drupal --no-owner < /tmp/path-to-the-file.pgdump

References

http://www.pixelite.co.nz/article/installing-and-configuring-postgresql-91-ubuntu-1204-local-drupal-development