How to Install IceHrm on FreeBSD Latest

IceHrm is an open source HRM software that helps organizations manage their HRM needs. In this tutorial, we'll walk through the steps to install IceHrm on FreeBSD Latest.

Before we begin, make sure your system meets the following requirements:

Step 1: Install Dependencies

We'll begin by installing the dependencies required to run IceHrm. To install the required PHP extensions, enter the following command in the terminal:

pkg install -y php72-mysqli php72-pdo php72-pdo_mysql

Next, we'll install the MySQL server by running the following command:

pkg install -y mysql80-server

Now, we'll start the MySQL server and configure it to start automatically on boot:

sysrc mysql_enable="YES"
service mysql-server start

Step 2: Download and Extract IceHrm

To download and extract IceHrm, follow these steps:

  1. Go to the IceHrm download page at https://icehrm.com/download.
  2. Click the "Download Latest Version" button to download the latest version of IceHrm.
  3. Once the download is complete, navigate to the directory where you downloaded the file.
  4. Extract the downloaded file using the following command:
tar -xzf icehrm-<version>.tar.gz

Replace <version> with the version number you downloaded.

  1. Move the extracted IceHrm files to your web server's root directory:
mv icehrm /usr/local/www/apache24/data

Step 3: Create a MySQL Database

Now that we have installed the dependencies and extracted IceHrm, we need to create a MySQL database for IceHrm. To do this, follow these steps:

  1. Log in to the MySQL server:
mysql -u root -p
  1. Create a new database and user:
CREATE DATABASE icehrm;
CREATE USER 'icehrmuser'@'localhost' IDENTIFIED WITH mysql_native_password BY 'icehrmpassword';
GRANT ALL PRIVILEGES ON icehrm.* TO 'icehrmuser'@'localhost';
FLUSH PRIVILEGES;

Replace icehrmuser and icehrmpassword with your desired username and password.

Step 4: Configure IceHrm

Now we'll configure IceHrm to connect to the MySQL database we created in the previous step. To do this, follow these steps:

  1. Copy the config.sample.php file to config.php:
cd /usr/local/www/apache24/data/icehrm/config
cp config.sample.php config.php
  1. Edit the config.php file:
nano config.php
  1. Update the following lines:
define('DB_HOST', 'localhost');
define('DB_USER', 'icehrmuser');
define('DB_PASSWORD', 'icehrmpassword');
define('DB_NAME', 'icehrm');

Replace icehrmuser and icehrmpassword with your MySQL username and password.

Step 5: Configure Apache

Finally, we'll configure Apache to serve IceHrm. To do this, follow these steps:

  1. Open the Apache configuration file:
nano /usr/local/etc/apache24/httpd.conf
  1. Uncomment the following line to enable PHP:
LoadModule php7_module        libexec/apache24/libphp7.so
  1. Add the following virtual host entry to the bottom of the file:
<VirtualHost *:80>
    ServerName your-domain.com
    ServerAlias www.your-domain.com
    DocumentRoot /usr/local/www/apache24/data/icehrm
    <Directory "/usr/local/www/apache24/data/icehrm">
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>

Replace your-domain.com with your domain name or server IP address.

  1. Save and close the file.

  2. Restart Apache to apply the changes:

service apache24 restart

Step 6: Access IceHrm

Now that we have completed the installation and configuration, we can access IceHrm by navigating to your domain name or server IP address in a web browser:

http://your-domain.com

You should now be able to log in to IceHrm using the default username and password:

Conclusion

In this tutorial, we walked through the steps to install IceHrm on FreeBSD Latest. With IceHrm installed and configured, you can now manage your organization's HRM needs more efficiently.

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!