Skip to content

Instantly share code, notes, and snippets.

@romgapuz
Created July 3, 2019 16:23
Show Gist options
  • Save romgapuz/8fb1f518d2300e377d73561ff58ff6ac to your computer and use it in GitHub Desktop.
Save romgapuz/8fb1f518d2300e377d73561ff58ff6ac to your computer and use it in GitHub Desktop.
Install ERPNext into Amazon EC2

Install ERPNext into Amazon EC2

These are the steps to install a standalone ERPNext into an Amazon EC2 instance running Ubuntu 18.04.

Create and connect to an EC2 instance

After connecting, run an update:

$ sudo apt-get update

Install Python and PIP

$ sudo apt-get install python
$ sudo apt-get install python-setuptools
$ sudo apt-get install python-pip

Install MariaDB

Update the repo:

$ 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'

Install MariaDB

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

$ sudo apt-get install libmysqlclient-dev

Edit the file "/etc/mysql/my.cnf"

$ sudo vim /etc/mysql/my.cnf

And add the following content:

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

[mysql]
default-character-set = utf8mb4

Run MariaDB server:

$ sudo service mysql restart

Install Redis

$ sudo apt-get install redis-server

Install Node.js

Select and install Node.js version 8:

$ curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
$ sudo apt-get install -y nodejs
$ sudo npm install -g yarn

Restart the server:

$ sudo shutdown -r 0

#Install Bench

$ git clone https://github.com/frappe/bench
$ pip install -e ./bench

Restart the server:

$ sudo shutdown -r 0

When it starts, check if Bench is working:

$ bench --version

It works if you see the version.

Install Frappe and ERPNext

Download and install Frappe:

$ bench init --frappe-branch master frappe-bench
$ cd frappe-bench

Initialize a new site:

$ bench new-site site1.local

Download and install ERPNext into the newly create site:

$ bench get-app erpnext https://github.com/frappe/erpnext
$ bench --site site1.local install-app erpnext

Start the app:

$ bench start
@DunnaSekhar
Copy link

DunnaSekhar commented Apr 26, 2022

Hii @romgapuz @tirth-pipalia @Ramr93

i was trying to install frappe-bench but it didn't get installed ......!!!!
While using this command "bench init --frappe-branch master frappe-bench"
i faced "ERROR: There was a problem while creating frappe-bench"

Can anybody help me with the solution
Screenshot (21)

@kortor19
Copy link

kortor19 commented Aug 3, 2022

How do you connect to EC2? Please I need details step

@Eng-MostafaAllam
Copy link

Eng-MostafaAllam commented Feb 4, 2023

Screenshot from 2023-02-04 04-46-14

can any one help me with this error!

@Atul1413
Copy link

Atul1413 commented Mar 8, 2023

i am also stuck here.

@adamb924
Copy link

adamb924 commented Aug 11, 2023

I had the same problem, but it worked when I used this command:

bench init --frappe-branch version-14 frappe-bench

From these instructions:
https://codewithkarani.com/2022/08/18/install-erpnext-version-14/

@Parth909
Copy link

I had the same problem, but it worked when I used this command:

bench init --frappe-branch version-14 frappe-bench

From these instructions: https://codewithkarani.com/2022/08/18/install-erpnext-version-14/

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment