1. Install postgresql
apt-get install postgresql
|
2. Initial db cluster
/usr/lib/postgresql/8.4/bin/initdb -D directory_name
|
3. start server
/usr/lib/postgresql/8.4/bin/pg_ctl -D initdb_directory_name
|
4. create database
/usr/lib/postgresql/8.4/bin/createdb mydb
5. create user role
/usr/lib/postgresql/8.4/bin/createuser user_name
6.alter user passwd
su postgres
psql postgres
alter user user_name with password 'new password';
7.connect
psql mydb
mydb#
阅读(554) | 评论(0) | 转发(0) |