PostgreSQL network installation

From ECHSA Congenital Database
Revision as of 00:31, 20 March 2017 by HubertCzobodzinski (talk | contribs) (db name)
Jump to navigationJump to search
  1. Server installation and configuration
    1. Go to the the PostgreSQL website, install and run the PostgreSQL server. Installation instructions can be found there. ECHSA Database Software should work flawlessly with any 8.x and 9.x PostgreSQL version, but we reccomend to use latest available release.
    2. Download following SQL scripts (right-click and choose "Save target as"):
    3. Create a database (for example with name "eacts") and connect to it. Run those two SQL scripts on this database.
    4. Configure your PostgreSQL server so it accepts connections from network.
      The configuration file is named:
      postgresql.conf
      You need to add following line:
      listen_addresses = '*'
      Second file that needs to be modified is:
      pg_hba.conf
      You need to add a line:
      host all all 192.168.3.0/24 md5
      Change 192.168.3.0/24 into your own network block, in format of X.X.X.X/Y where X.X.X.X is address of your network and Y is the number of bits in your netmask. In this example, the network is 192.168.3.0 - 192.168.3.255.
    5. Ensure that your PostgreSQL server accepts connections from the network. Check your firewall settings. Stop and start the service if needed.
    6. Create a database user and give him privileges to read and write in all tables in the database.
  2. Client installation and configuration
    1. Download and run the latest version of the EACTS Database Software. When a dialog appears type in your hospital code (three capital letters) and choose the default database path.
    2. Go to the software preferences directory
      .EactsCongenitalDatabase
      located in the user home directory (please note the dot character at the beginning of the directory name). Edit the ecdbc.properties file and set two variables: dbdriver and dburl. The user name and the password are to be set inside the dburl variable.
      dbdriver=org.postgresql.Driver
      dburl=jdbc:postgresql://srv_addr/eacts?user=your_user&password=your_users_password
      Change srv_addr into your server's address (like 192.168.0.12 or server.myhospital.org), and give your user's name and password.

Notes

  • You can perform more client installations and configure them in the same was as the first client.
  • As the server address give the IP adress (or a DNS name if appropiate) of the computer with running PostgreSQL server.
  • Proper TCP port (PostgreSQL's default is 5432) must be opened if the server is protected by a firewall
  • dburl must be in one (perhaps very long) line, together with "?user=...&password=...".