Database initialization
root# mkdir /usr/local/pgsql/data
root# chown postgres /usr/local/pgsql/data
root# su postgres
postgres$ initdb -D /usr/local/pgsql/data
Starting DB
$ postmaster -D /usr/local/pgsql/data >logfile 2>&1 &
pg_ctl start -l logfile
add user
postgres=# create user name password 'password';
CREATE ROLE
postgres=# \du
List of roles
Role name | Superuser | Create role | Create DB | Connections | Member of
-----------+-----------+-------------+-----------+-------------+-----------
name | no | no | no | no limit |
postgres | yes | yes | yes | no limit |
(2 rows)
Setup
Copy JDBC driver
Copy posgresql.jar to $JBOSS_HOME/server/default/lib
Copy postgres-service.xml
Copy $JBOSS_HOME/docs/examples/jca/postgres-service.xml to
$JBOSS_HOME/server/default/deploy
Modify postgres-service.xml
最終更新:2006年01月16日 00:08