19.5 Creating a PostgreSQL Database

Before you begin, you should be familiar with standard database maintenance procedures.

For more information about PostgreSQL, see the PostgreSQL documentation on the web.

To create the PosgreSQL database:

  1. Review the PostSQL requirements listed in Database Server Requirements.

  2. Ensure that the PostgreSQL database server and client have been installed and configured, as described in Installing and Running the Database Server.

  3. Ensure that the PostgreSQL database client is also installed on the Vibe server.

    The Vibe installation program needs the PostgreSQL client in order to communicate with the PostgreSQL database server.

  4. Ensure that you know the password for the PostgreSQL postgres administrator user.

  5. Configure the socket connection method.

    1. As the root user, browse to /var/lib/pgsql/data.

    2. Edit the pg_hba.conf file and change the following local and host lines to specify md5 encryption, as follows:

      local  all   all                  md5
      host   all   all   md5
      host   all   all   ::1/128        md5
    3. Save the file.

    4. Edit the postgresql.conf file.

    5. Make sure that the listen_addresses line is uncommented and configured to allow connection requests from all Vibe servers by specifying individual IP addresses or by replacing localhost with an asterisk (*).

    6. Save and close the file.

    7. Stop and restart the PostgreSQL system process.

  6. Copy the teaming-4.0.n-db.zip file from the Vibe server where the Vibe installation program is located and copy it to the database server.


    Download and unzip the Vibe software onto the database server.

  7. In the directory where the Vibe Installation program is located on the database server, or in the location where you copied the teaming-4.0.n-db.zip file, unzip the teaming-4.0.n-db.zip file.

  8. Change to the db subdirectory.

  9. Change to the db/scripts/sql subdirectory.

  10. Copy the postgresql-create-empty-database.sql script to a convenient temporary location on the server where you want to create the database, and ensure that your database management utility is on your path so that you can run it from that directory.

  11. Run the script to create your Vibe database:

    psql -Uadmin-username < "postgresql-create-empty-database.sql"

    You are prompted for the admin-user password.

  12. Change to the db directory:

  13. In a text editor, open the postgresql-liquibase.properties file and make the following changes:

    • Change the username, password, referenceUsername, and referencePassword fields to reflect the admin-username and password for accessing your database.

    • Replace localhost with the addresses specified in Step 5.e.

    • (Optional) If you changed the database name, change the url and referenceURL fields to reflect name of your Vibe database.

    Save and close the text editor.

  14. In the same directory, make the manage-database.sh file executable by entering the following command:

    chmod +x manage-database.sh

  15. Use the following command to create the database schema:

    ./manage-database.sh postgresql updateDatabase

    NOTE:You can safely ignore the following Liquibase log messages:

    • Warning: modifyDataType will lose primary key/autoincrement/not null settings for mysql

    • Any messages that contain the words info: failure or info: failed, as long as they are associated with a type INFO message

  16. Start the Vibe server as described in Starting Vibe on Linux.

  17. For security reasons, delete the password that you specified in Step 13 by opening the postgresql-liquibase.properties file and removing the password from the password and referencePassword fields.

  18. Save and close the properties file.