Installation


Server requirements

Apache 2.4

  • mod_rewrite

PHP 7.4 to 8.0

Check that your PHP version and configuration is valid both for PHP Web & CLI.

  • BCMath
  • Ctype
  • Fileinfo
  • JSON
  • Mbstring
  • OpenSSL
  • PDO (PDO_MYSQL / PDO_PGSQL)
  • Tokenizer
  • XML

Database

  • MySQL: 5.7 or 8.0
  • MariaDB: 10.3 or 10.4
  • PostgreSQL: 12 or 13

Utilities

  • Git
  • Composer 2

Upgrade from previous versions

From beta4 and beta5

You can keep and migrate your beta4 or beta5 database. Install the RC1 application, configure the database in the .env file, then run php artisan migrate. Of course, this is your responsability to make all the necessary backups and checks.

From older versions

The database schema has changed since beta4 and there is no migration. So we recommend installing a fresh application with a fresh database.

Fresh install

First steps

Assuming that you want to install TRAX LRS in a folder named traxlrs:

git clone --recursive --branch rc1 https://github.com/trax-project/trax2-extended-lrs traxlrs
cd traxlrs
composer install

File permissions

Folders storage and bootstrap/cache require write access by the web server. If you are not sure how to configure this, you can use the following commands for testing purpose.

chmod -R 777 bootstrap/cache
chmod -R 777 storage

Web server

For security reasons, only the public folder should be accessible by the web server. Create a virtual host and configure the document root to traxlrs/public.

Database

Create an empty database with the utf8mb4_unicode_ci encoding. Then, at the root of the application folder, make a copy of the .env.example file, rename it .env and enter your database settings.

MySQL/MariaDB example:

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=traxlrs
DB_USERNAME=root
DB_PASSWORD=

PostgreSQL example:

DB_CONNECTION=pgsql
DB_HOST=127.0.0.1
DB_PORT=5432
DB_DATABASE=traxlrs
DB_USERNAME=postgres
DB_PASSWORD=aaaaaa

App URL

In the .env file, you must set the public URL of your TRAX LRS application :

APP_URL=http://traxlrs.test

Last Steps

php artisan key:generate
php artisan migrate

Admin account

You can now create an admin account with the following command. This will give your credentials to log into the application.

php artisan admin:create

Additional commands and options are documented in Users & Roles.

CRON jobs

TRAX LRS needs to perform some tasks on a regular basis. Please, refer to the CRON jobs page to get more details.

Production server

In the .env file, change settings from:

APP_ENV=local
APP_DEBUG=true

To:

APP_ENV=production
APP_DEBUG=false

Finally, check the configuration documentation, as well as the performances optimization documentation.

Minor updates

You can get the last minor updates with the following commands:

git pull origin rc1
git submodule update
composer dumpautoload