How to Install Kimai on Debian Latest

Kimai is an open-source time tracking tool that allows users to keep track of their working hours, generate reports, and invoice clients. In this tutorial, we will provide you with step-by-step instructions on how to install Kimai on Debian Latest.

Prerequisites

Before you start, make sure you have the following:

  • A Debian latest server with sudo privileges.
  • LAMP stack installed on your Debian server.

Step 1 - Download the Latest Version of Kimai

First, you need to download the latest version of Kimai from the official GitHub repository using the following command:

sudo wget https://github.com/kevinpapst/kimai2/releases/download/1.17.2/kimai-complete-1.17.2.zip

Step 2 - Install Unzip

After downloading the Kimai zip file, you need to install the unzip package to extract the downloaded file. To install it, run the following command:

sudo apt-get install unzip

Step 3 - Extract Kimai

Next, extract the downloaded Kimai zip file using the following command:

sudo unzip kimai-complete-1.17.2.zip -d /var/www

Step 4 - Set Permissions

After extracting Kimai, set the permissions of the Kimai directory to the Apache user using the following command:

sudo chown -R www-data:www-data /var/www/kimai
sudo chmod -R 755 /var/www/kimai

Step 5 - Configure Apache

Now, you need to configure Apache to serve Kimai. Create a new Apache virtual host configuration file using the following command:

sudo nano /etc/apache2/sites-available/kimai.conf

Add the following configurations in the virtual host file:

<VirtualHost *:80>
  ServerAdmin [email protected]
  DocumentRoot /var/www/kimai/public
  ServerName example.com

  <Directory /var/www/kimai/public>
      Options Indexes FollowSymLinks MultiViews
      AllowOverride All
      Order allow,deny
      allow from all
  </Directory>

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

Save and close the file. Then, enable the virtual host using the following command:

sudo a2ensite kimai.conf

Finally, restart the Apache service to apply the changes:

sudo systemctl restart apache2

Step 6 - Set Up the Database

Now, you need to create a new database and user for Kimai. Log in to the MariaDB shell using the following command:

sudo mysql -u root -p

Then, create a new database, user, and password using the following commands:

MariaDB [(none)]> CREATE DATABASE kimai;
MariaDB [(none)]> CREATE USER 'kimai_admin'@'localhost' IDENTIFIED BY 'kimai_password';
MariaDB [(none)]> GRANT ALL PRIVILEGES ON kimai.* TO 'kimai_admin'@'localhost';
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> EXIT;

Step 7 - Install Required PHP Extensions

Kimai requires some PHP extensions to work correctly. To install them, run the following command:

sudo apt-get install php-xml php-zip php-mysql php-gd

Step 8 - Install Kimai

Now, open your web browser and enter your server's IP address or domain name in the address bar. You will see the Kimai installation wizard. Follow the on-screen instructions to install Kimai.

  • Choose your preferred language and click on “Continue”.
  • Check the system requirements and click on “Continue”.
  • Enter the database details and click on “Continue”.
  • Create the first user account and click on “Continue”.
  • Finally, click on “Finish Installation” to complete the installation process.

Step 9 - Access Kimai

Once the installation process is complete, you can access Kimai by visiting your server's IP address or domain name.

Congratulations! You have successfully installed Kimai on Debian Latest.