Company Size:
 
Region:

How to Install TimeTrex on Linux

Home / Installation Help

Installing TimeTrex on CentOS Linux from the .ZIP file:

  1. Install the prerequisite packages:
    yum install -y epel-release php php-cgi php-cli php-pgsql php-pspell php-gd php-gettext php-imap php-intl php-json php-soap php-zip php-mcrypt php-curl php-ldap php-xml php-xsl php-mbstring php-bcmath php-process httpd postgresql-server unzip
  2. Enable Apache to start on boot then restart the service:
    systemctl enable httpd
    service httpd restart
  3. Download the TimeTrex .ZIP file to your computer.
  4. 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
  5. Rename the TimeTrex.ini.php file:
    mv /var/www/html/timetrex/timetrex.ini.php-example_linux /var/www/html/timetrex/timetrex.ini.php
  6. 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 /var/timetrex
    mkdir /var/timetrex/storage
    mkdir /var/log/timetrex
    chgrp -R apache /var/timetrex/
    chmod 775 -R /var/timetrex
    chgrp -R apache /var/log/timetrex/
    chmod 775 -R /var/log/timetrex
    chgrp apache -R /var/www/html/timetrex/
    Configure SELinux so access to the above directories is allowed:
    chcon -R system_u:object_r:httpd_sys_rw_content_t:s0 /var/www/html/timetrex/
    chcon -R system_u:object_r:httpd_sys_rw_content_t:s0 /var/timetrex
    chcon -R system_u:object_r:httpd_sys_rw_content_t:s0 /var/log/timetrex
  7. Create a user and database for TimeTrex to use:
    postgresql-setup initdb
    systemctl start postgresql
    systemctl enable postgresql
    su postgres
    psql
    CREATE USER timetrex WITH CREATEDB CREATEROLE LOGIN PASSWORD 'passwordhere';
    CREATE DATABASE timetrex;
    \q
    exit
  8. Once you have made the database and user we need to set the authentication for connections to md5. We do this so we can log in with the password we set for the timetrex user:
    nano /var/lib/pgsql/data/pg_hba.conf
    Change the end of the following line:
    "local   all             all                                     peer"
    To this instead:
    "local   all             all                                     md5"
    Then restart postgres to load the new configuration:
    systemctl restart postgresql
  9. Temporarily disable SELinux during the final installation phase:
    setenforce 0
  10. 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
  11. Follow the on screen instructions that will walk you through the installation wizard.
  12. Re-enable SELinux now that the installation is completed:
    setenforce 1

See the following guides for instructions on installing TimeTrex for other operating systems: