Skip to content

Database Installation

Joe Futrelle edited this page Aug 10, 2015 · 8 revisions

domdb requires PostgreSQL, an open-source database engine. You can download it for your favorite platform here:

http://www.postgresql.org/download/

Under Windows, it is recommended to use the EnterpriseDB installer, which can be found here:

http://www.enterprisedb.com/products-services-training/pgdownload

When you install PostgreSQL, the installer will ask you to create a root password. Make a note of this password, because you will need it later in the process.

You will need to follow these instructions to allow client computers to connect to your PostgreSQL service. If you are installing PostgreSQL under Windows, this post explains where to find the files you will need to modify, as well as identifying the PostgreSQL Windows Service, which you will need to restart after you make changes to configuration files. In Windows under the EnterpriseDB installation you will need to modify pg_hba.conf but you will not need to modify postgresql.conf.

If you are running a firewall on your server, you will need to open TCP port 5432. Consult your firewall software's documentation to learn how to open ports.

Once you install PostgreSQL, it is useful to have a GUI-based tool for managing it. The PostgreSQL project provides one called PgAdmin III. If you installed PostgreSQL on Windows using the EnterpriseDB installer, you will already have this tool. Otherwise you can download it here:

http://www.pgadmin.org/

Complete documentation for PgAdmin III can be found here:

http://www.pgadmin.org/docs/

Configuring the database

To use domdb, you will need to create a database and a login role. You can do this in PgAdmin III. Open it, and select the item under "databases" which will have a name starting "PostgreSQL" and ending with "(localhost:5432)". Double-click to connect and enter the root password you set when installing PostgreSQL.

http://www.pgadmin.org/docs/1.20/connect.html

Now connect to the database by double-clicking on the connection you just created. Now create a login role. You can choose any name and password you want for this. Click on "Login roles", right-click, select "New login role..." and fill in the new username on the "Properties" tab and the password (twice) on the "Definition" tab.

Now create the database that will hold domdb data. To do this, click on "Databases", right-click, select "New database...". Under "Properties", create a name for your database (e.g., "domdb"), then select your login role as the "owner".

Now confirm that you can connect to the database as this login role by creating a new connection using your hostname, login role's name, and password. In pgAdmin III, select "Servers" and click on the plug icon to create a new connection. Enter the fully-qualified domain name of your host (e.g., myhost.somewhere.edu rather than myhost), the username you created for your login role, and the password you created for the login role. Once you save this connection, you should be able to double-click it to connect to the database. If that works, the CLI will work when you configure it according to the instructions in Command-line interface.

Clone this wiki locally