Skip to content

Instantly share code, notes, and snippets.

@vanglian
Forked from romgapuz/install-erpnext-ec2.md
Created December 20, 2021 13:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vanglian/0d667edebe741567062aa23086fd0d8b to your computer and use it in GitHub Desktop.
Save vanglian/0d667edebe741567062aa23086fd0d8b 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment