Table of contents
Homepage: |
http://www.postgresql.org/ |
Download: |
http://www.postgresql.org/download/ |
File(s): |
postgresql-8.4.1-1-windows.exe (39 MB) |
Installation
Windows:
- Execute the one-click installer "postgresql-8.4.1-1-windows.exe"
- Install it to a suitable directory, e.g. "C:\Program Files\PostgreSQL\8.4"
- Select a suitable data directory, e.g. "D:\PostgreSQL\data"
- Enter a password for admin account "postgres"
Configuration
Per default PostgreSQL is running on port 5432.
Usage
Windows:
- You can connect to the database with the pgAdmin tool (Start - Programs - PostgreSQL 8.4 - pgAdmin III)
- Use psql command shell.
Create new user
Create an user with password for e.g. Liferay Portal usage:
Create new database user
$ psql -U postgres -c "CREATE USER pg_liferay WITH PASSWORD 'life1ray2' CREATEDB" CREATE ROLE $
Create a new database
Create e.g. database pg_liferay for Liferay Portal usage:
Create new database
$ psql -U postgres -d template1 -c "CREATE DATABASE pg_liferay ENCODING='UNICODE';" CREATE DATABASE $
Grant all permissions for a database to an user
Grant all permissions for a database to an user
$ psql -U postgres -d template1 -c "GRANT ALL PRIVILEGES ON DATABASE pg_liferay to pg_liferay;" GRANT $