ERPNext Version 15 with HRMS Version 16 : External database Installation Guide ubuntu 24.04

This guide provides a step-by-step process to install ERPNext Version 15 with the latest HRMS Version 16 on a server with external MariaDB support.

Prerequisites

Software Requirements

  • Updated Ubuntu 24.04
  • User with sudo privileges
  • Python 3.11+
  • pip 20+
  • MariaDB 10.3.x (External MariaDB setup)
  • Node.js 18
  • Yarn 1.12+

Hardware Requirements

  • 4GB RAM
  • 32GB Hard Disk

MariaDB External Setup

Ensure your external MariaDB is configured with the following:

  • Enabled remote access.
  • User privileges granted for the ERPNext database.
  • Modified MariaDB configuration to:
[mysqld] 
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci 
[mysql]
default-character-set = utf8mb4

Restart MariaDB after changes:

sudo systemctl restart mariadb

Install Mariab client on application server :

sudo apt install mariadb-client

Step 1: Update and Upgrade Packages

sudo apt-get update -y && sudo apt-get upgrade -y

Step 2: Create a New User

It is recommended to use a non-root user for the installation. It is optional

sudo adduser amjid
sudo usermod -aG sudo amjid
su amjid
cd /home/amjid

Replace frappe-user with your preferred username.


Step 3: Install Required Packages

Install Git

sudo apt-get install git -y

Install Python Dependencies

sudo apt-get install python3-dev -y
sudo apt-get install python3-setuptools python3-pip -y
sudo apt install python3.12-venv -y

Install Redis Server

sudo apt-get install redis-server -y

Install CURL, Node.js, NPM, and Yarn

  1. Install Curl
sudo apt install curl -y

2. Install Nodejs

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
source ~/.profile
nvm install 18

3. Install NPM :

sudo apt-get install npm -y

4. Install Yarn:

sudo npm install -g yarn

Install wkhtmltopdf

sudo apt-get install xvfb libfontconfig wkhtmltopdf -y

Step 4: Install Frappe Bench & Ansible

Install Frappe Bench & Ansible

Bench is a CLI tool to manage Frappe Deployments

sudo -H pip3 install frappe-bench --break-system-packages

Ansible works as automation Agent to do site related activities like updates, backups, restores and migrations.

sudo -H pip3 install ansible --break-system-packages

Initialize Frappe Bench

bench init frappe-bench --frappe-branch version-15

Now open frappe-bench directory, we will work from there

cd frappe-bench

User permissions for amjid

chmod -R o+rx /home/amjid

Set mariadb host

bench set-mariadb-host 10.11.12.30

Step 5: Configure ERPNext and HRMS

Create a New Site

Replace amjid with your desired site name. and the IP Address with your ip

bench new-site syncbricks --db-host 10.11.12.30 --db-port 3306 --db-root-username amjid  --mariadb-user-host-login-scope='%'

Provide the MariaDB credentials when prompted.

Get ERPNext & HRMS

bench get-app --branch version-15 erpnext
 bench get-app --branch version-16 hrms

Install ERPNext & HRMS

bench --site syncbricks install-app erpnext
bench --site syncbricks install-app hrms

Start the Development Server

bench start

Access ERPNext on: http://10.11.12.31:8000


Step 6: Deploy ERPNext in Production Mode

Enable Scheduler and Disable Maintenance Mode

bench --site syncbricks enable-scheduler
bench --site syncbricks set-maintenance-mode off

Setup Production Configuration

sudo bench setup production amjid
bench setup nginx

Restart Supervisor

sudo supervisorctl restart all
sudo bench setup production amjid

Access your site via the server’s IP without specifying the port number. http://10.11.12.31

Atlernatively you can create user

CREATE USER ‘root’@’10.11.12.31’ IDENTIFIED BY ‘erpnext’;

GRANT ALL PRIVILEGES ON *.* TO ‘root’@’10.11.12.31’ IDENTIFIED BY ‘erpnext’ WITH GRANT OPTION;

FLUSH PRIVILEGES; EXIT;

now set the bench for databse

bench set-mariadb-host 10.11.12.31


Summary of Steps

  1. Set up prerequisites including external MariaDB.
  2. Create a new user and install required software packages.
  3. Install and configure Frappe Bench.
  4. Install ERPNext and HRMS apps.
  5. Deploy ERPNext in production mode.

This completes the installation of ERPNext Version 15 with HRMS Version 16.

Leave a Comment