ERPNext is an Enterprise Resource Planning (ERP) platform that leverages the facility of open-source technologies. It excels at managing core business processes like finance, sales and purchase, HR, manufacturing, and more.
ERPNext is an application developed on the Frappe Framework. Frappe is a full-stack web framework written in Python. It takes full advantage of the Node/JS runtime environment and uses MariaDB as its database. Among the numerous advantages of Frappe applications, like ERPNext, are the bench CLI. The bench CLI saves time by automating tasks like installing, updating, configuring, and managing multiple Frappe/ERPNext sites.
In this Blog, You will learn how to manually setup and install ERPNext in development mode.
• Python 3.6+
• Node.js 12
• Redis 5 (caching and realtime updates)
• MariaDB 10.3 or Postgres 9.5
• yarn 1.12+ (js dependency manager)
• pip 15+ (py dependency manager)
• cron (scheduled jobs)
• wkhtmltopdf v 0.12.5 (with patched qt)
- Install python3.6.
- Then install Git on our system, If already installed, then you can skip this step
- $ sudo apt-get install git
- Check whether git has been correctly installed
- $ git --version
- You should then see git version X.Y.Z on the console
- Now install some python3 dependencies
- $ sudo apt-get install python3-dev python3-setuptools python3-pip virtualenv
- You might want to use an alias for pip and python to enforce the use of python3.
- $ alias python=python3
$ alias pip=pip3
Maria DB Installation
- Now we will install Maria DB in our system, Simply run these commands.
- $ sudo apt-get install software-properties-common
$ sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
$ sudo add-apt-repository 'deb [arch=amd64,i386,ppc64el] http://ftp.ubuntu-tw.org/mirror/mariadb/repo/10.3/ubuntu xenial main'
$ sudo apt-get update
$ sudo apt-get install mariadb-server-10.3
- During this installation of MariaDB, you'll be prompted to set the root password for MySQL. If you are not prompted for the same, you'll have to initialize the MySQL server setup yourself after the installation is completed. You can initialize the MySQL server set up by this command.
- $ sudo mysql_secure_installation
- Note - Only run this command if you were not prompted for a password during Maria Db Installation.
- Note - Also, It is very important to remember this password.
- Now run this command to install the MYSQL Database development files
- $ sudo apt-get install libmysqlclient-dev
- Now we will edit the Maria Db configuration file.
- Run this command - $ sudo nano /etc/mysql/my.cnf .
- Add these to the file.
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
default-character-set = utf8mb4
- Now press CTRL+X to exit and restart the MYSQL server by this command.
- $ sudo service mysql restart
Redis and Node Installation
- Install redis by using the following command:
- $ sudo apt-get install redis-server
- Install Node.js 12.X package by using the following command
- $ sudo apt-get install curl
- $ curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
- $ sudo apt-get install -y nodejs
- Install yarn by using the following command
- $ sudo npm install -g yarn
- $ sudo apt install yarn
Create a User
Frappe and bench should be running under a non-root user. Use the following commands to create and switch to the new user, Change frappe_user to any username you like.
- $ adduser frappe_user
- $ usermod -aG sudo frappe_user
- $ su - frappe_user
- Install bench using this command
- $ pip3 install frappe-bench
- You can check the bench version by using this command.
- Create a new bench by using this command.
- $ bench init frappe-bench
- Now change directory to the new bench.
- Now, as the bench init command pulls frappe from the develop branch, we have to switch the branch to version-12. Run the following command.
- $ bench switch-to-branch version-12
- $ bench update --patch
- $ bench migrate
- Before running the migrate command, open another terminal in the same directory and run bench start
- Now, To create a new site use this command.
- $ bench new-site site1.local --db-name site1.local
- Use --db-name , to specify your own db name for this site.
- To fetch ERPNext version-12, run this command.
- $ bench get-app --branch version-12 erpnext.
- Install ERPNext on your site by using this command.
- $ bench --site site1.local install-app erpnext
- ERPNext is now installed. You can run the server by using the following command.
To Enable developer mode, Navigate to frappe-bench -> sites -> site1.local and open site_config.json, and add this
Then run $ bench clear-cache
Note:- To access your site with site1.local:8000 in the browser, navigate to /etc, and open hosts and add 127.0.0.1 site1.local and save.
You have now learned about installing ERPNext 12 in Developer Mode.
Powered by the Frappe framework, ERPNext is an open source ERP used to build data-driven applications. We are an ERP Development Company with the objective of transforming businesses with cost-effective technological development services. Our services include mobile and web applications as well as SaaS for WFM, HRM, CRM, Finance, Accounting, eCommerce, and more. Get in touch with our experts to implement custom-built applications and software suites for your business.