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:
- FreeBSD Latest
- Apache web server
- PHP 7.2 or later with the following extensions:
- mysqli
- pdo
- pdo_mysql
- MySQL database server
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:
- Go to the IceHrm download page at https://icehrm.com/download.
- Click the "Download Latest Version" button to download the latest version of IceHrm.
- Once the download is complete, navigate to the directory where you downloaded the file.
- Extract the downloaded file using the following command:
tar -xzf icehrm-<version>.tar.gz
Replace <version> with the version number you downloaded.
- 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:
- Log in to the MySQL server:
mysql -u root -p
- 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:
- Copy the
config.sample.phpfile toconfig.php:
cd /usr/local/www/apache24/data/icehrm/config
cp config.sample.php config.php
- Edit the
config.phpfile:
nano config.php
- 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:
- Open the Apache configuration file:
nano /usr/local/etc/apache24/httpd.conf
- Uncomment the following line to enable PHP:
LoadModule php7_module libexec/apache24/libphp7.so
- 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.
Save and close the file.
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:
- Username: admin
- Password: admin
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.