Difference between revisions of "PostgreSQL network installation"
From ECHSA Congenital Database
Jump to navigationJump to search (New links to sql files.) |
|||
Line 2: | Line 2: | ||
##Go to the the [http://www.postgresql.org PostgreSQL website], install and run the PostgreSQL server. Installation instructions can be found there. ECHSA Database Software should work flawlessly with any PostgreSQL version starting from 8.x, but we recommend to use latest available release. | ##Go to the the [http://www.postgresql.org PostgreSQL website], install and run the PostgreSQL server. Installation instructions can be found there. ECHSA Database Software should work flawlessly with any PostgreSQL version starting from 8.x, but we recommend to use latest available release. | ||
##Download following SQL scripts (right-click and choose "Save target as"): | ##Download following SQL scripts (right-click and choose "Save target as"): | ||
− | ##*[https:// | + | |
− | ##*[https:// | + | ##*[https://cloud.magnum2.pl/index.php/s/e9BRaXRdtr8D26c postgresql_struct.sql] |
+ | ##*[https://cloud.magnum2.pl/index.php/s/qadjiHGyMzkrqAW postgresql_dict.sql] | ||
+ | |||
##Create a database (for example with name "eacts") and connect to it. Run those two SQL scripts on this database. | ##Create a database (for example with name "eacts") and connect to it. Run those two SQL scripts on this database. | ||
##Configure your PostgreSQL server so it accepts connections from network. <br> The configuration file is named: <pre>postgresql.conf</pre>You need to add following line: <pre>listen_addresses = '*'</pre> Second file that needs to be modified is: <pre>pg_hba.conf</pre>You need to add a line: <pre>host all all 192.168.3.0/24 md5</pre> 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. | ##Configure your PostgreSQL server so it accepts connections from network. <br> The configuration file is named: <pre>postgresql.conf</pre>You need to add following line: <pre>listen_addresses = '*'</pre> Second file that needs to be modified is: <pre>pg_hba.conf</pre>You need to add a line: <pre>host all all 192.168.3.0/24 md5</pre> 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. |
Revision as of 17:30, 28 February 2025
- Server installation and configuration
- 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 PostgreSQL version starting from 8.x, but we recommend to use latest available release.
- Download following SQL scripts (right-click and choose "Save target as"):
- Create a database (for example with name "eacts") and connect to it. Run those two SQL scripts on this database.
- 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. - Ensure that your PostgreSQL server accepts connections from the network. Check your firewall settings. Stop and start the service if needed.
- Create a database user and give him privileges to read and write in all tables in the database.
- Client installation and configuration
- 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.
- 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=...".