Linux

How to install ERPNext-15 on Ubuntu 22

ERPNext is an open-source, web-based Enterprise Resource Planning (ERP) system built on the Frappe Framework. It helps businesses manage key processes such as accounting, inventory, sales, purchasing, human resources, manufacturing, and customer relationship management in one unified platform. ERPNext is highly customizable, easy to use, and can be deployed on-premise or in the cloud, making it suitable for companies of all sizes.

How to install ERPNext-15 on Ubuntu 22

1. Prepare the system

  • Update operating system:

    sudo apt update && sudo apt upgrade -y
  • Create a separate user (e.g. frappe or erpnext), make sure it has sudo rights:

    sudo adduser frappe
    sudo usermod -aG sudo frappe
    su - frappe

2. Install Required Dependencies

  • Basic packages:

    sudo apt install git python3-dev python3-pip python3-venv build-essential \
      libffi-dev libssl-dev nginx supervisor xvfb libfontconfig wkhtmltopdf \
      software-properties-common libmysqlclient-dev curl
  • MariaDB and UTF8 configuration:

    sudo apt install mariadb-server mariadb-client -y
    sudo mysql_secure_installation

    Open the MariaDB configuration file and add:

    [mysqld]
    character-set-client-handshake = FALSE
    character-set-server = utf8mb4
    collation-server = utf8mb4_unicode_ci
    [mysql]
    default-character-set = utf8mb4

    Then, restart the service:

    sudo service mysql restart
  • Redis, Node.js (v18+), Yarn:

    sudo apt install redis-server
    curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
    source ~/.profile
    nvm install 18
    sudo npm install -g yarn

3. Install Bench and ERPNext

  • Install frappe-bench:

    pip3 install frappe-bench
  • Initialize the bench environment:

    bench init --frappe-branch version-15 frappe-bench
    cd frappe-bench
  • Create new site:

    bench new-site site1.local
  • Download ERPNext (v15) and other apps if needed:

    bench get-app --branch version-15 erpnext
    bench get-app payments
    bench get-app hrms  # nếu cần
    bench --site site1.local install-app erpnext
    bench --site site1.local install-app hrms

4. Run in Development Mode

  • Start the developer - access via http://<your-server-ip>:8000:

    bench start

5. Deploy in Production Mode

  • Configure production mode and web server:

    bench --site site1.local enable-scheduler
    bench --site site1.local set-maintenance-mode off
    sudo bench setup production frappe
    bench setup nginx
    sudo supervisorctl restart all
    sudo service nginx reload
  • (Optional) Set up multi-tenant, domain, SSL:

    bench config dns_multitenant on
    bench setup add-domain sub.yourdomain.com --site site1.local
    sudo snap install core certbot --classic
    sudo certbot --nginx

 

Quick Summary

StepDescribe
1. Prepare the systemUpdate, create user
2. Install dependenciesGit, Python, MariaDB, Redis, Node.js, Yarn, wkhtmltopdf...
3. Install ERPNextBench, init, new-site, get-app, install-app
4. Development Runbench start
5. DeployProdsetup production, Nginx, Supervisor, SSL...

 

Thanks for visit my website