Let me preface this with I am not a professional web administrator, programmer, and there’s a better than even chance I’m missing things and/or not optimizing my install. I am placing this information as much for myself to review for future installs (for example if something is broke and I need to start over) as anyone else. I’m also new with TimeTrex and haven’t even fully tested the install, albeit want a guide to delete and start over.
1. Add PostgreSQL database server
2. Under Virtualmin -> System Settings -> Features and Plugins -> Check Postgre as an option for the virtualmin server
3. Create Virtualmin Server -> uncheck mariaDB and check Postgres dbs
4. Do not create initial web page content
5. Set unique IP address (for internal LAN access if using reverse proxy – HAProxy)
6. Go to File manager -> change directory to one above the ‘public_html’ (home/name_of_virtual Server) upload TimeTrex to this folder and extract compressed
While in the same folder, create the following directories-> var/cache, var/log, & var/storage (these directories can’t be accessible to the outside and must be somewhere not in the public_html directory)
7. in File manager -> go to TimeTrex_Community folder just uploaded -> click the following folders to get to the HTML folder usr/share/timetrex/html
8. Copy contents of HTML folder (includes many folders and files) using Edit-> Copy
9. Change to public_html directory-> paste the contents
10. review the timetrex.ini.php-example_linux for guidance
11. Open/Edit the timetrex-ini.php file (this is the settings file for TimeTrex) to make changes based on your virtualmin server
Make the following changes
log = /var/log/timetrex -> log = /home/name_of_virtual_server/var/log // example (ie log = “/home/timeclock/var/log”)
; storage = /var/lib/timetrex/storage
storage = /home/name_of_virtual_server/var/storage
type = postgres8
host = localhost // (assuming the db is on the same host)
database_name = Your_db_name
user = Your_username
password = your_password
base_url = /interface
dir = “/home/name_of_virtual_server/var/cache”
hostname = Your_hostname // example hostname = 1reason.com & don’t include https:// etc…..
Change the salt to something else example salt = 1ReasonIsGreat // anything is fine, just so it’s not the default making it easier to recreate passwords for the evil people
Setup email settings as appropriate
Make sure all the directories created have appropriate permissions (read, write, etc….)
Save and continue to the webportal for additional setup
During the install Wizard -> At the system settings page, remove the trailing slash after /interface
Setting up Cron Job
Go to Webmin -> System -> Scheduled Cron Jobs
Create a new scheduled cron job ->
Execute cron job as Your_server_user (click the user icon and select)
Active YES
Command -> php /home/Your_server_user/public_html/maint/cron.php> /dev/null 2>&1 (actually copy and paste the command shown in the setup, albeit this was the one at the time of writing). Pay attention to the spaces (ie after php for example)
Simple schedule -> Daily (at midnight) ->>>>>>This will likely require changing to a much more frequent basis (for example every 5 or 10 minutes????), albeit you don’t want it running when you’re adding users etc in the beginning….or run the risk of having to start over as that is what appeared to happen to me.
All days/months/etc… and run on any date
Click Create and continue (once everything appears to be running correctly with one or two users, come back and run the job to test. If the test passes, increase the frequency). Note to the developers, using language such as “to be run regularly throughout the day” is WAY too ambiguous for production use.