/// article
Comprehensive Guide: ERPNext Installation on Ubuntu 22.04 – Step-by-Step Tutorial
Enterprise Resource Planning (ERP) is a crucial element for managing business processes efficiently. ERPNext is an open-source ERP system that provides a comprehensive suite of applications to streamline various aspects of business operations. This step-by-step guide will walk you through the process of installing ERPNext on Ubuntu 22.04, ensuring a smoot...
Enterprise Resource Planning (ERP) is a crucial element for managing business processes efficiently. ERPNext is an open-source ERP system that provides a comprehensive suite of applications to streamline various aspects of business operations. This step-by-step guide will walk you through the process of installing ERPNext on Ubuntu 22.04, ensuring a smooth and successful setup. Prerequisites: Before initiating the installation, make sure you have the following prerequisites in place: Ubuntu 22.04 Server: Set up a clean installation of Ubuntu 22.04 on your server. User with sudo Privileges: Create a new user, grant sudo privileges, and set a secure password: # useradd -m frappe -s /bin/bash # usermod -aG sudo frappe # passwd frappe Adequate Resources: Allocate sufficient resources (CPU, RAM, and storage), depending on your business needs. Update System Packages: Log in using the frappe user and run the system update: # su - frappe $ sudo apt update Install Dependencies: ERPNext relies on certain dependencies. Install them using the following commands: $ sudo apt install -y python3-minimal build-essential python3-setuptools nginx-extras supervisor Install wkhtmltopdf: ERPNext utilizes wkhtmltopdf for generating PDFs. Install it with the following commands: $ sudo apt install -y libxrender1 libxext6 xfonts-75dpi xfonts-base $ sudo wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.bionic_amd64.deb $ sudo dpkg -i wkhtmltox_0.12.5-1.bionic_amd64.deb $ sudo apt -f install Install Node.js Install it using the following commands: $ sudo apt install -y nodejs npm $ sudo npm install -g yarn Setup MariaDB Database Server: Install and secure MariaDB: $ sudo apt install mariadb-server mariadb-client $ sudo mysql_secure_installation Edit MySQL default config file: $ sudo nano /etc/mysql/my.cnf Add the following block to the end then save and exit. [mysqld] character-set-client-handshake = FALSE character-set-server = utf8mb4 collation-server = utf8mb4_unicode_ci [mysql] default-character-set = utf8mb4 Install Redis Server: For caching and task queue management, install Redis: $ sudo apt install redis-server Get Frappe Bench: Install Frappe Bench, the command-line tool to manage ERPNext installations: $ pip3 install frappe-bench Add Bench to your path: $ nano ~/.bashrc Add the following line at the end: PATH=$PATH:~/.local/bin/ Execute command to apply changes: $ source ~/.bashrc Initialize Frappe Bench: Initialize Bench for version 14: $ mkdir /opt/erp $ sudo chown -R frappe:frappe /opt/erp $ cd /opt/erp $ bench init --frappe-branch version-14 frappe-bench $ cd frappe-bench $ chmod -R o+rx /home/frappe Create a Site: Create a site for ERPNext: $ bench new-site erpnext.yourdomain.com $ bench use erpnext.yourdomain.com Replace erpnext.yourdomain.com with your desired domain. Download ERPNext App: Download ERPNext app for version 14: $ bench get-app --branch version-14 erpnext Install app to the site: bench --site erpnext.yourdomain.com install-app erpnext Setup Supervisor: Supervisor makes sure that the process that power the Frappe system keep running and it restarts them if they happen to crash. The configuration will be available in config/supervisor.conf directory. You can then copy/link this file to the supervisor config directory and reload it for it to take effect. Create a supervisor configuration file: $ cd /opt/erp/frappe-bench $ bench setup supervisor Create a symlink: $ sudo ln -s ~/frappe-bench/config/supervisor.conf /etc/supervisor/conf.d/frappe-bench.conf Restart Supervisor: $ sudo service supervisor restart Verify services managed by supervisord $ sudo supervisorctl status Setup Nginx: Nginx is a web server and we use it to serve static files and proxy rest of the requests to frappe. The configuration will be available in config/nginx.conf file. You can then copy/link this file to the nginx config directory and reload it for it to take effect. Create nginx configuration file: $ rm /etc/nginx/sites-enabled/default $ bench setup nginx $ sudo ln -s /opt/erp/frappe-bench/config/nginx.conf /etc/nginx/sites-enabled/frappe-bench.conf $ sudo nginx -t $ sudo systemctl restart nginx.service Your ERPNext instance should now be accessible in your web browser. Navigate to http://erpnext.yourdomain.comand log in using the credentials you provided during the installation. Congratulations! You have successfully installed ERPNext on Ubuntu 22.04. Explore the its interface, configure settings, and customize it according to your business requirements. References: https://frappeframework.com/docs/user/en/installation https://github.com/frappe/erpnext