Skip to content

Latest commit

 

History

History
134 lines (95 loc) · 3.51 KB

package-installation.md

File metadata and controls

134 lines (95 loc) · 3.51 KB

Package based Installation

To get started with Leantime, make sure you meet the system requirements and dependencies, and then follow the installation steps below either using Apache or Nginx:

  1. Download the latest release package

  2. Create a empty MySQL database

  3. Create a leantime directory and set appropriate permissions

cd /var/www/html/
sudo mkdir leantime
sudo chown -R www-data:www-data leantime
sudo chmod -R 755 leantime
  1. Upload the unzipped release package in the newly created leantime directory

Apache Installation Process

  1. Configure Apache to point to public\ of leantime
cd /etc/apache2/sites-available/
sudo nano leantime.conf
  1. Add the following code in leantime.conf and save it:
<VirtualHost *:8080>
        ServerName leantime
        DocumentRoot /var/www/html/leantime/public

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

Use a port other than 80, as it is the default port. Then add the following line in etc/apache2/ports.conf file:

Listen <<your port number>>
  1. Enable the new site configuration, rewrite module and restart apache:
sudo a2ensite leantime.conf
sudo a2enmod rewrite
sudo systemctl restart apache2
  1. Navigate to the config/ directory in your leantime installation. Rename .env.sample to .env

  2. Fill in your database credentials (username, password, host, dbname) in .env

LEAN_DB_HOST=<your host name>
LEAN_DB_USER=<your db_user name>
LEAN_DB_PASSWORD=<your db_user password>
LEAN_DB_DATABASE=<your db name. From step 1>
LEAN_DB_PORT='3306'                     # Database default port
  1. Navigate to <yourdomain.com>/install

  2. Follow instructions to install database and set up User Account

Nginx Installation Process

  1. Configure Nginx to point to public\ of leantime
cd /etc/nginx/sites-available/
sudo nano leantime
  1. Add the following code in leantime file and save it:
server {
    listen 80;
    server_name leantime;
    root /var/www/html/leantime/public;
    index index.php index.html index.htm;

    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }

    location ~ \.php$ {
        fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;
        fastcgi_index index.php;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    }

    location ~ /\.ht {
        deny all;
    }
}

Note: Make sure PHP-FPM is installed and running

  1. Enable the new site configuration, rewrite module and restart apache:
sudo ln -s /etc/nginx/sites-available/leantime /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl restart nginx
  1. Navigate to the config/ directory in your leantime installation. Rename .env.sample to .env

  2. Fill in your database credentials (username, password, host, dbname) in .env

LEAN_DB_HOST=<your host name>
LEAN_DB_USER=<your db_user name>
LEAN_DB_PASSWORD=<your db_user password>
LEAN_DB_DATABASE=<your db name. From step 1>
LEAN_DB_PORT='3306'                     # Database default port
  1. Navigate to <yourdomain.com>/install

  2. Follow instructions to install database and set up User Account