OrangeHRM is an open source human resource management software that helps businesses to manage various HR functions. In this tutorial, we will guide you through the installation of OrangeHRM on FreeBSD.
Before you start with the installation process, you need to ensure that your FreeBSD system meets the following requirements:
We recommend that you have root access to the FreeBSD system before installing OrangeHRM.
OrangeHRM requires an Apache web server to function properly. If you don't have Apache installed, you can install it by running the following command:
pkg install apache24
After installing Apache, start the Apache service and enable it to start during system boot:
sysrc apache24_enable="yes"
service apache24 start
OrangeHRM relies on MySQL as its database backend. You can install it using the following command:
pkg install mysql57-server
After installing MySQL, start the MySQL service and enable it to start during system boot:
sysrc mysql_enable="yes"
service mysql-server start
Next, you need to secure the MySQL installation. Run the following command to launch the secure installation script:
mysql_secure_installation
Just follow the on-screen instructions to secure the MySQL installation.
OrangeHRM requires PHP version >= 7.1 and some extensions to work properly. You can install them using the following command:
pkg install php71 php71-mysqli php71-openssl php71-mbstring php71-mysql php71-pdo php71-pdo_mysql
After installing PHP and its extensions, restart the Apache service to load the new PHP modules:
service apache24 restart
Download the latest version of OrangeHRM from https://www.orangehrm.com/ using the following command:
wget https://downloads.sourceforge.net/project/orangehrm/stable/4.4.1/orangehrm-4.4.1.2.zip
After download, extract the downloaded file to Apache's document root directory:
unzip orangehrm-4.4.1.2.zip -d /usr/local/www/apache24/data/
Change the ownership and permissions of the OrangeHRM directory:
chown -R www:www /usr/local/www/apache24/data/orangehrm/
chmod -R 755 /usr/local/www/apache24/data/orangehrm/
Create a new MySQL database and user for OrangeHRM using the following commands:
mysql -u root -p
Enter the MySQL root password and run the following commands in MySQL shell:
CREATE DATABASE orangehrm;
CREATE USER 'orangehrmuser'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON orangehrm.* TO 'orangehrmuser'@'localhost';
FLUSH PRIVILEGES;
EXIT;
Replace password
with a strong password of your choice.
Rename the config-sample.php
file in the OrangeHRM directory to config.php
:
mv /usr/local/www/apache24/data/orangehrm/symfony/plugins/orangehrmConfigPlugin/config/config-sample.php /usr/local/www/apache24/data/orangehrm/symfony/plugins/orangehrmConfigPlugin/config/config.php
Edit the config.php
file and update the MySQL database details section with the details of the database that you created in Step 5:
define('DB_HOST', 'localhost');
define('DB_USER', 'orangehrmuser');
define('DB_PASSWORD', 'password');
define('DB_NAME', 'orangehrm');
Open your web browser and navigate to http://<your-server-IP>/orangehrm
. You should see the OrangeHRM setup wizard. Follow the on-screen instructions to complete the setup process.
Once the setup process is complete, you can access OrangeHRM by navigating to http://<your-server-IP>/orangehrm
.
Congratulations! You have successfully installed OrangeHRM on FreeBSD.
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!