Today, we will discuss how to install ERPNext ERP system on Debian 10 (Buster) Linux system. ERPNext is an open source ERP system written in ERP Frappe framework . ERPNext ERP system provides outstanding functions suitable for small and medium enterprises. Some of its main features are:
- Inventory management
- Accounting management
- Purchase management
- Manufacturing Management
- Customer Relationship Management System
- Sales management
- Project management
- Huma resource management system, etc.
ERPNext set prerequisites:
- Updated Debian 10 Linux
- User with sudo privileges
- MariaDB database server
- Nodejs, Nginx, yarn, redis, wkhtmltopdf
Install ERPNext in Debian 10 (Buster)
Start by installing ERPNext by making sure our system is updated:
sudo apt update sudo apt -y upgrade
It is recommended that you reboot your system each time you upgrade:
Step 1: Install Python tools and wkhtmltopdf
Begin the installation process by ensuring that all Python build packages required to build and set up ERPNext are installed:
sudo apt -y install git vim libffi-dev python-pip python3-distutils python-dev libssl-dev wkhtmltopdf
Step 2: Install Redis and Node.js
Nodejs is required to run ERPNext on Debian 10 (Buster).
sudo apt -y install nodejs npm redis-server sudo npm install -g yarn
Step 3: Install Nginx web server and MariaDB database server
The next steps are Nginx and MariaDB, which serve ERPNext and store database data, respectively.
Install Nginx using the following command:
sudo apt -y install nginx
To install MariaDB server on Debian, follow these guidelines:
Install MariaDB on Debian 10 (Buster)
Make sure you have the following settings mysqld with MySQL Customers provided:
$ sudo nano /etc/mysql/my.cnf [mysqld] character-set-client-handshake = FALSE character-set-server = utf8mb4 collation-server = utf8mb4_unicode_ci [mysql] default-character-set = utf8mb4
After installing the MariaDB database server, you should create a database for the erpnext user.
sudo systemctl restart mariadb
Log in and create Mysql database
$ mysql -u root -p
Create a database and grant users all permissions to manage the database.
CREATE USER [email protected] IDENTIFIED BY 'password123'; CREATE DATABASE erpnext; GRANT ALL ON erpnext.* TO 'erpnext'@'localhost' with grant option; FLUSH PRIVILEGES; QUIT;
Step 4: Install Bench and ERPPNext
Workbench is a tool for installing and managing ERPNext on Debian systems. We will create a user who will run the ERPNext system and then configure the system.
sudo useradd -m -s /bin/bash erpnext sudo passwd erpnext sudo usermod -aG sudo erpnext
Update your PATH.
$ sudo su - erpnext $ vim ~/.bashrc PATH=$PATH:~/.local/bin/
Create a directory for ERPNext setup and provide
erpnext User read and write permissions on the directory:
sudo mkdir /srv/bench sudo chown -R erpnext /srv/bench
Next switch to the erpnext user and install the application:
sudo su - erpnext cd /srv/bench
Use the following command to clone the Bench code from github
$ git clone https://github.com/frappe/bench bench-repo Cloning into 'bench-repo'... remote: Counting objects: 5832, done. remote: Compressing objects: 100% (43/43), done. remote: Total 5832 (delta 20), reused 20 (delta 6), pack-reused 5783 Receiving objects: 100% (5832/5832), 29.61 MiB | 17.62 MiB/s, done. Resolving deltas: 100% (3720/3720), done.
Now install Bench using the pip command:
sudo pip install -e bench-repo
The next step is to initialize the Bench directory with the frappe framework installed:
cd /srv/bench bench init erpnext cd erpnext
Example output is:
... Done in 71.43s. INFO:bench.utils:bench build yarn run v1.21.1 $ FRAPPE_ENV=production node rollup/build.js Production mode ✔ Built js/moment-bundle.min.js ✔ Built js/libs.min.js Building frappe assets... ✔ Built js/checkout.min.js ✔ Built js/dialog.min.js ✔ Built js/modules.min.js ✔ Built js/social.min.js ✔ Built js/web_form.min.js ✔ Built js/list.min.js ✔ Built js/chat.js ✔ Built css/frappe-rtl.css ✔ Built css/printview.css ✔ Built css/module.min.css ✔ Built css/form.min.css ✔ Built css/list.min.css ✔ Built css/report.min.css ✔ Built frappe/css/email.css ✔ Built js/desk.min.js ✔ Built js/barcode_scanner.min.js ✔ Built css/frappe-chat-web.css ✔ Built css/web_form.css ✔ Built css/desk.min.css ✔ Built js/frappe-recorder.min.js ✔ Built css/frappe-web-b4.css ✔ Built js/frappe-web.min.js ✔ Built js/bootstrap-4-web.min.js ✔ Built js/control.min.js ✔ Built js/form.min.js ✔ Built js/data_import_tools.min.js ✔ Built js/report.min.js ✨ Done in 90.204s Done in 91.96s. INFO:bench.utils:setting up backups no crontab for erpnext INFO:bench.utils:setting up auto update no crontab for erpnext Bench erpnext initialized
Create a new Frappe website.
$ cd /srv/bench/erpnext $ bench new-site erp.computingforgeeks.com MySQL root password: Installing frappe... Updating DocTypes for frappe : [========================================] Updating country info : [========================================] Set Administrator password:
Re-enter Administrator password: *** Scheduler is disabled ***
The above command will ask you to provide MySQL root Password and set a new password for the administrator account of the web interface. Wait for the new Frappe website to be created before continuing.
Step 5: Launch the ERPNext application and access the UI
After deploying the application, you can start it with:
$ bench start
When the program runs, you should get:
12:49:02 redis_queue.1 | 30491:M 18 Jul 12:49:02.630 * Ready to accept connections 12:49:03 socketio.1 | listening on *: 9000 12:49:08 web.1 | * Running on http://0.0.0.0:8000/ (Press CTRL+C to quit) 12:49:09 web.1 | * Restarting with inotify reloader 12:49:09 watch.1 | yarn run v1.7.0 12:49:09 watch.1 | $ node rollup/watch.js 12:49:09 web.1 | * Debugger is active! 12:49:09 web.1 | * Debugger PIN: 849-623-753 12:49:10 watch.1 | 12:49:10 watch.1 | Rollup Watcher Started 12:49:10 watch.1 |
From the output, you can confirm that the service is running http://0.0.0.0:8000/. To access the web interface, open the server IP address and port http: // ip-address: 8000.
It is not recommended to run ERPNext in a production environment. Instead, we will install the supervisor and configure Nginx:
Step 6: Configure Nginx and Supervisord
sudo apt -y install supervisor
Run the production configuration script:
$ sudo bench setup production erpnext supervisor.conf already exists and this will overwrite it. Do you want to continue? [y/N]: y Port configuration list: Site erp.computingforgeeks.com assigned port: 80 nginx.conf already exists and this will overwrite it. Do you want to continue? [y/N]: y INFO:bench.utils:sudo /usr/bin/supervisorctl reread No config updates to processes INFO:bench.utils:sudo /usr/bin/supervisorctl update nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful INFO:bench.utils:sudo systemctl reload nginx
The generated Nginx file is located in the following location: /etc/nginx/conf.d/erpnext.conf And the supervisor profile is /etc/supervisor/conf.d/erpnext.conf.
Open the application domain configured to log in, http://erp.computingforgeeks.com
You should get a page to log in. Use username administrator And the password you provided during setup.
Select the language you want to select and click “next“. Next select the country and it will automatically populate the currency.
Add the first user with email and password and click “Complete setup“Button.
Once done, you should enter the ERPNext web dashboard.
Setting up ERPNext on Ubuntu
How to install Odoo 13 on Ubuntu 18.04 Linux
Install Dolibarr ERP and CRM on Ubuntu 18.04 LTS