How to Install IceHrm on OpenSUSE
IceHrm is a comprehensive HRM solution that helps businesses to manage employee data, leave management, and attendance tracking. This guide will walk you through the process of installing and configuring IceHrm on OpenSUSE.
Prerequisites
- OpenSUSE Latest Version
- MySQL or MariaDB server
- Apache or Nginx web server
- PHP 7.1 or later
Step 1: Install Required Packages
First, install some necessary packages for IceHrm:
sudo zypper update
sudo zypper install apache2 php7 php7-mysql php7-pear php7-gd php7-zip php7-mbstring php7-json php7-iconv php7-dom
Step 2: Download IceHrm
Download the latest version of IceHrm from the official website using the following command:
curl -o icehrm.zip -L https://github.com/gamonoid/icehrm/releases/latest/download/icehrm.zip
Extract the downloaded file into the directory of your choice:
sudo unzip icehrm.zip -d /var/www/icehrm
Step 3: Database Setup
Create a new MySQL or MariaDB database for IceHrm:
sudo mysql -u root -p
create database icehrmdb;
grant all privileges on icehrmdb.* to 'icehrmuser'@'localhost' identified by 'password';
flush privileges;
Exit MySQL by typing exit.
Step 4: Configure IceHrm
Go to the IceHrm root directory and rename the config file:
cd /var/www/icehrm
cp config.sample.php config.php
Now, edit the config.php file by entering the database details:
sudo nano config.php
/* Database connection details */
define("DB_HOST", "localhost");
define("DB_USER", "icehrmuser");
define("DB_PASSWORD", "password");
define("DB_NAME", "icehrmdb");
Save and exit the file.
Step 5: Permissions
Make sure the www-data user has the permissions to the icehrm directory:
sudo chown -R www-data:www-data /var/www/icehrm
sudo chmod -R 755 /var/www/icehrm
Step 6: Apache Configuration
Create a new virtual host for the IceHrm in the Apache configuration:
sudo nano /etc/apache2/conf.d/icehrm.conf
<VirtualHost *:80>
DocumentRoot /var/www/icehrm
ServerName icehrm.example.com
<Directory /var/www/icehrm>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Save and exit the file.
Next, enable the Apache rewrite module and restart the web server:
sudo a2enmod rewrite
sudo systemctl restart apache2
Step 7: IceHrm Installation
Open a web browser and navigate to http://<your-server-ip-address>/install/. You should see the IceHrm welcome screen.
Follow the on-screen instructions to complete the installation process.
Conclusion
You have successfully installed IceHrm on OpenSUSE. You can now start managing your employee data and HR tasks from within IceHrm.