How to Install OrangeHRM on NetBSD
OrangeHRM is a popular open-source human resource management software that helps you manage employee data, attendance, performance, and much more. This guide will show you how to install OrangeHRM on a NetBSD machine.
Prerequisites
- NetBSD machine with root access
- 512 MB of RAM and 500 MB of disk space
- A web server (Apache, Nginx)
- PHP 5.4 or greater
- MySQL or MariaDB database server
Step 1: Download OrangeHRM
- Visit the OrangeHRM download page (https://www.orangehrm.com/open-source/download-open-source-hr/) and download the latest stable version of OrangeHRM for Linux/Unix.
- Extract the downloaded file using the following command:
tar -xzvf orangehrm-4.5.10.tar.gz
Step 2: Install Required Packages
- Open the terminal and run the following commands to install the required packages:
pkg_add apache php
pkg_add mysql-server
- Start the MySQL server using the following command:
/usr/pkg/bin/mysqld_safe &
Step 3: Create a Database
- Log in to the MySQL server using the following command:
mysql -u root -p
- Create a new database using the following command:
CREATE DATABASE oranghrm;
- Create a new MySQL user and grant privileges using the following commands:
CREATE USER 'oranghrmuser'@'localhost' IDENTIFIED BY 'your_password';
GRANT ALL PRIVILEGES ON oranghrm.* TO 'oranghrmuser'@'localhost';
FLUSH PRIVILEGES;
- Exit the MySQL server using the following command:
exit;
Step 4: Configure Apache Web Server
Open the Apache configuration file (/usr/pkg/etc/httpd/httpd.conf) using your preferred text editor.
Add the following lines at the end of the file:
<Directory "/path/to/orangehrm">
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
Alias /oranghrm /path/to/orangehrm
- Save and close the file.
Step 5: Install OrangeHRM
- Move the extracted OrangeHRM directory to the Apache document root (/var/www/htdocs) using the following command:
mv orangehrm-4.5.10 /var/www/htdocs/orangehrm
Open the OrangeHRM configuration file (/var/www/htdocs/orangehrm/lib/confs/Conf.php) using your preferred text editor.
Update the database configuration settings with the following values:
define('DB_NAME', 'oranghrm');
define('DB_USER', 'oranghrmuser');
define('DB_PASSWORD', 'your_password');
define('DB_HOST', 'localhost');
define('DB_TYPE', 'mysql');
define('DB_PORT', '3306');
Save and close the file.
Ensure that the apache web server is running.
/usr/pkg/sbin/apachectl start
Step 6: Access OrangeHRM
- Open your web browser and navigate to http://localhost/orangehrm/.
- Follow the on-screen instructions to complete the OrangeHRM installation process.
Congratulations! You have successfully installed OrangeHRM on your NetBSD machine.