The server needs to be set up on one machine and the application can be set up on as many machines as you wish.
Follow these steps if you are using the TMPostgresSetup installer program and you may want to bookmark this page in your browser in case you want to refer to these installation steps. If you are only installing a demo, refer to the last column for the required steps.
task | Description | Full Install | Demo |
1 | Download the Postgres installer for Windows | yes | yes |
2 | The installation of the PostgreSQL server. Please make sure to read any caveats for the version of Windows you are using. | yes | yes |
3 | Installing the demo database and the main Theatre Manager User | optional | yes |
4 | Configuration of the server parameters for maximizing performance in a production database | yes | |
5 | Creating a daily backup job in TM Server | yes | |
6 | Considerations for installing virus protection on the PostgreSQL server - please do not include the Postgres data folder. | yes | |
7 | Turn off Microsoft disk indexing on the volume that the database is running on. | yes | |
8 | Turn off Microsoft Auto Updates on the database server so that it will not restart in the middle of sales. Applying Microsoft patches and updates should be done on a planned basis -- perhaps bi-weekly or monthly as a practice (or immediately if there is a current threat) | yes |
DO NOT set up the Postgres database server to also act as ACTIVE DIRECTORY or as a DOMAIN CONTROLLER.
While it is possible to do so, the reasons not to are:
|
We DO NOT recommend that the database server JOIN a windows DOMAIN CONTROLLER either. There is no need for it. If you wish to join a domain controller, please leave the database server login window pointing to the local machine (instead of the domain). It makes a user logging on for support and updates easier. Note that the machine should always be locked so sign-in is required - per PCI compliance. |
We DO NOT recommend installing virus software on the Postgres database server. Since access to the server is under very controlled access via port 5432 from the Theatre Manager application only, it should not be required. If you must install virus software on the database machine, set it to scan the machine daily and void the Postgres DB files. The best defence against any virus software is a backup of the database off machine and, even better, off premises. |
Windows Small Business Server | For Windows Small Business Server, you MUST turn off 'disk quota management' for all users prior to installing Postgres (and leave it off). Otherwise, you may run out of space for the installer and any databases that get installed. |
Windows 8 and higher | For Windows 8 and higher, you may need to turn off UAC (user access control) if it is acting as a server. You can run Theatre Manager on other workstations with UAC on. |
Windows 2012 Server and higher | With Windows Server, you will need to be a local administrator to install Postgres. |
When you run the installer for the database, accept all the defaults.
Click OK | Right click on the TMPostgresSetup.exe application and use Run As to begin the install. Select a LOCAL administrator as the user ID to use for the install. If a checkbox that implies "Protect My Computer" or "Run with Restrictions" is available and enabled, uncheck the box to allow the installer to run with full install privileges. |
Click Next | |
Click Next | |
Click Next | |
Click Yes | At the end of the TM PostGres installer, you are asked if you want to install the PostGreSQL database in the dialog (as in below).
If you say yes, postgres will install automatically for you and you can SKIP the next section describing how to install it manually and proceed to the step where the installer asks about installing a demo database
Alternatively, you can install them later manually by:
|
Do not do this step if you elected to let the Theatre Manager Postgres installer automatically install Postgres for you. Only reference these instructions if you are running the actual Postgres installer from the Postgres web site manually. |
Accept all the defaults on the screens that follow except the last one that references 'stackbuilder'.
Before starting the install, please check that the computer date and timezone settings are correct. Failure to do so may cause postgres to think it is in a different timezone. | |||||
Click Next | |||||
Click Next |
|
||||
Click Next |
Enter a hardened ' Account Password' for the postgres user. If you do not supply one, we will generate one automatically. However, if this is a demo. In that case, please pick a user password that you remember - we suggest 'Master'.
|
||||
Click Next |
Leave the Port Number as 5432 (if you change the standard port, you will also have to change it in Theatre Manager login window) |
||||
Click Next |
Leave both these settings as shown. |
||||
Click Next | |||||
Click Next | You will need to wait for a bit while the database server is installed |
||||
Click Finish |
At this time, the database should have installed successfully and should be runnning. |
Click Yes | |
Wait | Wait while a DOS window pops up and shows the progress of the demo database being imported. Depending on the performance and RAM in your machine, this could take a few minutes to finish. |
When the DOS window closes, the database server is installed, and the TheatreManagerDemo database is imported. |
Only perform this step if you did not install the demo database when installing server. |
After the database server is installed, You need to create a specific user called TheatreManager and give them privileges. You also want to import a demo database. This step assumes that you have installed into C:\BoxOffice. If you did not, then you will need to edit the .bat files and do this step manually.
1. | Go to C:\BoxOffice directory. You will see some files and folders with names similar to below.
|
||
2. | Double click on the 'ImportDemo' bat file. This starts a DOS prompt and start the bat file running.
If you have altered the install directory, you will need to change the path name to point to the location that Postgres was installed in. Often, this is just changing the drive letter. |
||
3. | You are asked for the password to create the 'TheatreManager' user. Type the password you used for the installation of the database in the preceding section. If this is a demo database install, this may have been 'master' you used when installing the server.
|
||
4. | You are asked for the password to create a 'TheatreManagerDemo' database. Type the same password used above and elsewhere in the install instructions. | ||
5. | You are asked again for the password to import data into the TheatreManagerDemo database. Type the same password again and you will see a lot of lines displayed to you after that point as the demo database is imported.
|
Another way to get the key config parameters is to use pgtune and paste the results at the bottom of the postgresql.conf file
1. | Configuring postgres entails editing two files in the 'data' folder of the current postgres installation as highlighted below:
|
||||||||||||||||||||||||||
2. |
edit the pg_hba.conf file using Notepad++
|
||||||||||||||||||||||||||
3. |
Edit the postgesql.conf file. Some notes about editing:
|
||||||||||||||||||||||||||
4. |
Reload or restart the postgres server to cause the new settings to be used.
All changes to the pg_hba.conf and many changes to postgresql.conf can be reloaded. That put the parameters in place without restarting the server, so any services (like web sales) that are running, continue to run. A reload is done by:
A few changes to the postgresql.conf file will require the postgres server to be completely restarted. This is usually noted in the comments beside the parameter. If this is required, the general steps are below. It is very rare that these parameters are changed after installation - so it might be best to ask support to help you with a complete server restart if you are not familiar:
|
It is generally best to create your own certificate. It takes about 30 seconds to do, and has the advantage that the certificate is unique to your database.
Start a CMD prompt, type the following 3 commands, and then follow the instructions as prompted. You can copy/paste the commands.
cd C:\OpenSSL-Win32 cd bin openssl req -newkey rsa:4096 -nodes -keyout server.key -x509 -days 365 -out server.crt |
Answer all the questions you are asked and when done, find the files in the C:\OpenSSL-Win32\bin directory called:
We have created a 4094 bit TLS certificate and included it with the installer. While it is better to create your own, if you need one fast to get started, you can use ours and create your own later (per the step above).
Go to the C:\BoxOffice folder and find the files called:
Venues with databases on the AMS Cloud do not need to set up or manage backups - other than to request a special backup before running year end rollover |
Once the database is set up, you will need to establish a backup frequency that is appropriate for your venue.
There are two steps to configuring the backup:
From then on, backups occur automatically. If they do not, you will receive a message on login that a backup has not been run for the past 24 hours.
On Windows machines:
These are something to be done manually and on a periodic scheduled basis. You do not want servers restarting in the middle of the night, nor do you want downloading to affect performance of your servers.
NOTE: if using windows 10 pro, you need to permanently disable windows defender using one of the methods in the link. In win 10 Pro, use gpedit.msc to disable by group policy editor since windows 10 turns it back on later if you only temporarily disable it (Another stupid idea form Microsoft)
Note: turn off any virus scanning against the database directory which is usually
C:\Program Files\PostgreSQL
or
D:\Program Files\PostgreSQL (if there are two drives)
Leaving any of those on will affect performance of the server for the database
Windows Automatic Updates is now found in Services in Windows 10.
How to locate:
We suggest disabling power management on the ethernet card.
In addition, please make sure to disable power management except for monitors.
Make sure to also turn off power saving on your ethernet card on all servers and workstations. |
Create a custom Power Plan
You can usually turn of most indexing by clicking on the properties of the device. However, it seems windows 10 doesn't fully listen, so it may be best to approach this task via the control panel.
It may take several minutes for Indexing to complete. If a message pops up indicating Administrator permissions are required click Ok. If the current user is not the Administrator a prompt for the Administrator password will appear. Enter the password and continue. If a prompt appears indicating select folders cannot be altered it may be they are already open. Click Ignore All and let the process continue.
Repeat this setting on the Web Listener computer, and the Apache server as well
To check if the setting is turned on:
If Folder Versions reads "There are no previous versions available" this option is turned off. However, if backups are listed with date and time stamps, the feature is enabled and needs to be turned off.