Installing Frappe and ERPNext on Ubuntu 18.04 LTS

Step by step Installation process for frappe and ERPNext on Ubuntu 18.04 LTS

 · 2 min read

Installing Frappe and ERPNext on Ubuntu 18.04

Install Prerequisites:

  1. Python 3.6+
  2. Node.js 12
  3. Redis 5 (caching and realtime updates)
  4. MariaDB 10.3.x (to run database driven apps)
  5. yarn 1.12+ (js dependency manager)
  6. pip 2.0+ (py dependency manager)
  7. wkhtmltopdf (version 0.12.5 with patched qt) (for pdf generation)
  8. cron (bench's scheduled jobs: automated certificate renewal, scheduled backups)
  9. NGINX (proxying multitenant sites in production)

Install git, python and redis:

  apt install git python-dev redis-server

Install MariaDB:

  apt-get install software-properties-common


 If you are on Ubuntu version older than 20.04, run this before installing MariaDB:

  apt-key adv --recv-keys --keyserver hkp:// add-apt-repository 'deb [arch=amd64,i386,ppc64el] xenial main'


 If you are on version Ubuntu 20.04, then MariaDB is available in default repo and you can directly run the below commands to install it:

  apt-get update apt-get install mariadb-server-10.3


 During this installation you'll be prompted to set the MySQL root password. If you are not prompted, you'll have to initialize the MySQL server setup  yourself. You can do that by running the command:


  apt-get install libmysqlclient-dev

 Remember: only run it if you're not prompted the password during setup. It is really important that you remember this password, since it'll be useful later on. You'll also need the MySQL database development files.  


 Now, edit the MariaDB configuration file.

  nano /etc/mysql/my.cnf

 And add this configuration


  character-set-client-handshake = FALSE

  character-set-server = utf8mb4

  collation-server = utf8mb4_unicode_ci


  default-character-set = utf8mb4

 Now, just restart the mysql service and you are good to go.

  service mysql restart

Install Node:

  curl -o- | bash


 After nvm is installed, you may have to close your terminal and open another one. Now run the following command to install node.

  nvm install 12

 Verify the installation, by running:

  node -v

  # output


Install yarn using npm

  npm install -g yarn

Install wkhtmltopdf:

  apt-get install xvfb libfontconfig wkhtmltopdf

Install Bench CLI

 Install bench via pip3

  pip3 install frappe-bench

 Confirm the bench installation by checking version

  bench --version

  # output 13.4.1


Setting up Frappe Bench.

  cd ~ bench init frappe-bench

 After the frappe-bench folder is created, change your directory to it and run this command

  bench start

Install ERPNext:

  bench get-app

  bench install-app erpnext

 Keep bench start on one tab and try on another tab

  bench migrate && bench build

Congratulations, you have installed bench and ERPNext on to your system !!!

1 comment
Sherin K R June 12, 2021


Add Comment