13.3. Installing And Testing PostERP Server Program

13.3.1. Installing PostERP Server Program

PostERP server does not require installation. All you need to do is making sure Windows TCP/IP communication protocol is working.

Tip

Traffic between PostERP server and PostgreSQL is heavy. It is a good idea to arrange the Windows host that runs PostERP server and the host that runs PostgreSQL in the same network block and link them to the same hub or switch.

Tip

If speed is not an issue, you can also consider installing all components- PostgreSQL, PostERP server, and PostERP client - in the same Windows.

If PostgreSQL is installed on Linux, then you can also consider installing WINE in the same Linux host and running PostERP server program in WINE environment. Note that earlier versions of FreeBSD appear to have threading issue with WINE. As a result, PostERP server crashed when it ran in WINE on top of these FreeBSD.

The benefits of running PostERP server and PostgreSQL are apparent: costs of hardware and management are minimized and the distance data travelling between PostERP server and PostgreSQL is shortened.

Important

Downloaded files server.exe and libpq.dll must be placed in the same subdirectory of the host computer.

Figure 13-2. PostERP Server

13.3.2. Testing PostERP Server Program

Launch PostERP server program by double clicking on server.exe. The follow these steps:

  1. Specify PostgreSQL Host Address.

  2. Specify the port PostgreSQL is listening.port.

  3. Specify the port this PostERP server will be listening to PostERP clients.

  4. Check Production Run.

  5. Push Test PostgreSQL Connection button.

  6. If "Fail" shows, then please read C:\PostERP.log and investigate all the entered parameters and network. Try and see if you are able to connect to PostgreSQL from this host using psql.

  7. If "Pass" shows, then push Start button.

  8. If the screen banner shows captions, then this indicates that PostERP server is normally functioning and is ready to accept the connection requests from PostERP clients.

Tip

If PostgreSQL and PostERP server are installed in the same computer, enter 127.0.0.1 in box Host Address PostgreSQL Is Listening.

13.3.3. Simplify Starting PostERP Procedure

You can skip the repeated tedious typing parameters every time starting PostERP server by preparing the following start-up JSON configuration file and save it as C:\posterp.js (or /usr/local/etc/posterp.js in Linux):

{
	"logger_file_name":"C:\\posterp.log" //log file name
	,"pg_host_ip":"127.0.0.1" //PostgreSQL IP address
	,"default_dbms_port":5432 //default PostgreSQL port
	,"default_database":"posterp" //database name
	,"default_schema":"public" //schema name
	,"default_dba_account":"postgres" //account used to login PostgreSQL
	,"dba_password":"myYpPasswWorrd" //password used to login PostgreSQL
	,"client_port":7500 //TCP port listening to desktop PostERP clients
}
			

Now, to run and start PostERP server with one shot, issue this command:

server.exe C:\posterp.js
			

or in Linux:

wine /usr/local/bin/server.exe /usr/local/etc/posterp.js
			

Important

Security measures must be taken in order to protect this configuration file from being viewed by unauthorized persons.