Tutorial Request: ERPNext Platform

June 26, 2016 5.8k views
MariaDB Node.js Redis Python DNS Let's Encrypt Email Ubuntu

Dear Digital Ocean Contributors!

Please place a detailed and step-by-step guide to install ERPNext.com platform from manual installation points of view.

The guys out there are doing good job but it looks like some commits having bad impact on the overall performance.

Please go through and provide clear manual installation guide for the components named Bench, Frappe Framework and ERPNext.

They are calling the last two as Apps based on the 1st one as somehow engine.

Please assume that, non-skilled users like me are looking for installation specific versions of any of the above, in particular Frappe Framework which is not clear out there.

Please consider Ubuntu 14.04, MariaDB, Redis, NodeJS and WKHTMLtoPDF with patched QT.

Assume the source is available for any which is not supposed to be the latest ones.

Thank you!

2 Answers

It appears that they provide a installer for ERPNext. Based on the documentation available the process would be:

1.) Create a new droplet using Ubuntu 14.04 or CentOS 7

2.) Log into the droplet as root

3.) Run the following:

wget https://raw.githubusercontent.com/frappe/bench/develop/playbooks/install.py
sudo python install.py --production

According to the official documentation this will:

This script will:

  • Install pre-requisites like git and ansible
  • Shallow clones this bench repository under /usr/local/frappe/bench-repo
  • Runs the Ansible playbook 'playbooks/develop/install.yml', which:
  • Installs
    • MariaDB and its config
    • Redis
    • NodeJS
    • WKHTMLtoPDF with patched QT
  • Initializes a new Bench at ~/frappe/frappe-bench with frappe framework already installed under apps.

You will have to manually create a new site (bench new-site) and get apps that you need (bench get-app, bench install-app).

Here are the scripts we use to install ERPNext in two steps:

  1. Create a droplet using Ubuntu 16.04 with 1-2GB of RAM and on the fresh console, and then make sure locale and python 3 are installed. Then download the official ansible script from frappe that will then download and install all the requirements for running erpnext. This will install the default site of erpnext. Follow instructions below to install more instances of erpnext on the same VM. We have installed more than 30 on a single droplet and counting.
    sudo locale-gen en_US.UTF-8
    sudo add-apt-repository ppa:jonathonf/python-3.6
    apt-get update
    apt-get install -y python3.6
    echo "frappe ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
    wget https://raw.githubusercontent.com/frappe/bench/master/playbooks/install.py
    python3.6 install.py --production --user frappe --mysql-root-password mysqlpa55w00rd --admin-password adminpa55w00rd

notes: substitute "mysqlpa55w00rd" and "mysqlpa55w00rd" accordingly

  1. Create a script named install-erp.sh
#!/bin/bash -x

cd /home/frappe/frappe-bench
sudo yes y | sudo bench new-site $2  --mariadb-root-password mysqlpa55w00rd --admin-password adminpa55w00rd
sudo yes y | sudo bench set-nginx-port $2 $1
sudo yes y | sudo bench --site $2 install-app erpnext
sudo yes y | sudo bench setup nginx
sudo service nginx reload
sudo yes y | sudo bench setup production frappe

notes: substitute "mysqlpa55w00rd" and "mysqlpa55w00rd" as needed

  1. run the script with the following parameters:
$ port=8080
$ erpname=mysite
$ install-erp.sh $erpname $port

where erpname is the name of the site instance and the port 8080 is the port number.

  1. Let the installer finish. The resulting installation is going to be on the droplet ip and the port number like:
    http://yourdroplet_ip:8080

  2. you could then configure a proxy to handle the ports as subdomains so your erpnext site is easily located as:
    http://mysite.mydroplet

  3. Enjoy erpnext!!

Have another answer? Share your knowledge.