- Install the prerequisite packages:
If using Ubuntu, ensure that you have the universe repository included, by running:
add-apt-repository universe
Ubuntu 22.04 [Jammy] / Debian 12 [Bookworm]:
apt-get install unzip apache2 libapache2-mod-php php php8.1-cgi php8.1-cli php8.1-pgsql php8.1-pspell php8.1-gd php8.1-gettext php8.1-imap php8.1-intl php8.1-json php8.1-soap php8.1-zip php8.1-curl php8.1-ldap php8.1-xml php8.1-xsl php8.1-mbstring php8.1-bcmath postgresql
- Restart Apache after all packages are installed:
service apache2 restart
- Download the TimeTrex .ZIP file to your computer.
- Unzip the TimeTrex .ZIP file to the root web directory:
unzip <TimeTrex-installer>.zip -d /var/www/html/
Rename the unzipped directory:
mv /var/www/html/TimeTrex_v<version>/ /var/www/html/timetrex
- Rename the TimeTrex.ini.php file:
mv /var/www/html/timetrex/timetrex.ini.php-example_linux /var/www/html/timetrex/timetrex.ini.php
- Edit the timetrex.ini.php and confirm all paths are correct:
nano /var/www/html/timetrex/timetrex.ini.php
Note: Make sure the log directory and storage paths are created and that Apache can write to them.
If you are using the default directories you can use these commands:
mkdir -p /var/timetrex/storage
mkdir -p /var/log/timetrex
chgrp -R www-data /var/timetrex/
chmod 775 -R /var/timetrex
chgrp www-data -R /var/log/timetrex/
chmod 775 -R /var/log/timetrex
chgrp www-data -R /var/www/html/timetrex/
chmod 775 -R /var/www/html/timetrex/
- Create a user and database for TimeTrex to use:
sudo su postgres
psql
CREATE USER timetrex WITH CREATEDB CREATEROLE LOGIN PASSWORD 'password_here';
CREATE DATABASE timetrex;
\q
- Point your web browser to the TimeTrex web-based installer:
http://<web server address>/<timetrex directory>/interface/install/install.php
ie: http://www.my-company.com/timetrex/interface/install/install.php
- Follow the on screen instructions that will walk you through the installation wizard.
*NOTE: On the "Database Configuration" step you will need to enter the above created password for the database in the "Database Password" field.