How to Install IceHrm on Debian

In this tutorial, we will guide you through the installation of IceHrm on Debian.

Step 1: Update Debian

Before installing IceHrm, we need to update Debian to ensure that we have the latest software.

sudo apt update && sudo apt upgrade

Step 2: Install Required Dependencies

IceHrm requires some dependencies to be installed on the system. Run the following command to install all the dependencies.

sudo apt-get install -y apache2 php php-curl php-gd php-pdo php-mysql php-ldap php-intl php-bcmath php-mbstring php-xml composer unzip

Step 3: Download and Extract IceHrm

Download the latest version of IceHrm from the official website. Choose the appropriate version that suits your installation.

wget https://icehrm.com/uploads/downloads/IceHrm-latest.zip -O icehrm.zip

Unzip the downloaded file using the following command.

sudo unzip icehrm.zip -d /var/www

Change the directory to icehrm and rename the file settings.dist.php to settings.php.

cd /var/www/IceHrm/ && sudo cp settings.dist.php settings.php

Step 4: Setup Database and User for IceHrm

Create a new database and user for IceHrm with the following commands.

sudo mysql -u root -p
CREATE DATABASE icehrmdb;
GRANT ALL ON icehrmdb.* TO 'icehrmuser'@'localhost' IDENTIFIED BY 'yourpassword';
FLUSH PRIVILEGES;
exit

In the settings.php file, edit the database details with the new database name, the username, and password created in the previous step.

define('DB_DATABASE', 'icehrmdb');
define('DB_USER', 'icehrmuser');
define('DB_PASSWORD', 'yourpassword');

Step 5: Create Virtual Host

Create a new virtual host configuration file with the following command.

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

Add the following content to the file.

<VirtualHost *:80>
    ServerName example.com
    DocumentRoot /var/www/IceHrm
    <Directory /var/www/IceHrm/>
        Options Indexes FollowSymLinks
        AllowOverride All
        Order allow,deny
        allow from all
    </Directory>
    ErrorLog /var/log/apache2/icehrm_error.log
    CustomLog /var/log/apache2/icehrm_access.log combined
</VirtualHost>

Save the file and exit. Enable the new virtual host and restart the Apache webserver.

sudo a2ensite icehrm.conf
sudo systemctl restart apache2

Step 6: Grant Permissions

Grant write access to the following directories by running the following command.

sudo chown -R www-data:www-data /var/www/IceHrm/app/tmp
sudo chown -R www-data:www-data /var/www/IceHrm/app/logs
sudo chown -R www-data:www-data /var/www/IceHrm/app/i18n

Step 7: Access IceHrm

Open your web browser and type your server IP address or domain name in the address bar.

http://your_server_ip

You will be directed to the IceHrm setup page. Follow the installation wizard and enter the database details and admin credentials.

Conclusion

Congratulations! You have successfully installed IceHrm on Debian. We hope this tutorial has helped you with the installation process. If you have any issues or questions, feel free to ask in the comments section.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!