|
Key
This line was removed.
This word was removed. This word was added.
This line was added.
|
Changes (7)
View page history... |
| h2. Using Netbeans as IDE with PostgreSQL |
| h3. Starting the DB |
| In SXDE 1/08, before starting to use PostgreSQL DB, execute the following command as root user: |
| user: |
| * {info:title=In Console} |
| /usr/sbin/svcadm enable postgresql:version_82 {info} |
| You do not need to setup PostgreSQL data directory or create a postgres user as it is already created in Solaris OS. The above command will also start the PostgreSQL DB. |
| You do not need to setup PostgreSQL data directory or create a postgres user as it is already created in Solaris OS. The above command will also start the PostgreSQL DB. |
| h3. Additional Configuration The pre-existing PostgreSQL SMF service is disabled by default. So, if you (as owner and single user of the machine) don't enable the SMF service, the default port won't be used. So you can start PostgreSQL on a non-default port also. If you want a PostgreSQL instance that is owned and managed by you and runs on the default port, just call initdb as shown in the above section followed by pg_ctl start. If you need to enable the pre-existing PostgreSQL SMF service, and if you want to manage it from another user name, then you need to assign the necessary privileges. Execute the following command just once: {info:title=In Console} $ usermod -P "Postgres Administration" <username> {info} h3. Adding a Connection For using PostgresSQL DB in your application through NetBeans, you need to let NetBeans now the existence and authentication information of the DB. For this reason, you need to create a new DB connection from NetBeans IDE. * Go to Service tab. * Right click Databases and select New Connection. * In the New Database Connection dialog select PostgreSQL as the DB. * Enter the Driver name as org.postgresql.Driver if not present already. * Provide the Database URL. postgres is the name of the DB. * Enter user name and password (Default user name is postgres and password is an empty string ''). * Click OK. * Click Advanced tab and select the schema. * Click OK. |
| h2. Using Glassfish as Application Server with PostgreSQL |
... |