Skip to content

Instantly share code, notes, and snippets.

@eshafik
Last active November 25, 2022 13:35
Show Gist options
  • Select an option

  • Save eshafik/288d3b02231bc10bde22b520f3202ee0 to your computer and use it in GitHub Desktop.

Select an option

Save eshafik/288d3b02231bc10bde22b520f3202ee0 to your computer and use it in GitHub Desktop.
ERPNext Manual Installation Process on MAC M1

Step-1: Install and Run MariaDB server on local machine (if not exists)

brew install --cask wkhtmltopdf
brew install mariadb

Add the following lines in the config file

sudo nano /opt/homebrew/etc/my.cnf

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

[mysql]
default-character-set = utf8mb4

Installation of secrue installation input the following-

mysql.server start

sudo mariadb-secure-installation


Ouptut screen:
Enter current password for root (enter for none): (just press return)

Switch to unix_socket authentication [Y/n]: (press n)

Change the root password? [Y/n]: (press Y)

New password: (enter your password)
Re-enter new password: (re-enter your password)
Remove anonymous users? [Y/n] (press n)
Disallow root login remotely? [Y/n] (press n)
Remove test database and access to it? [Y/n] (press n)
Reload privilege tables now? [Y/n] (press Y)
Thanks for using MariaDB!

Now you can enter your mysql console-

mysql -u root -p

(Make sure your mariadb server is running, if need run - brew services restart mariadb sometimes you need to restart your machine)

Step-2: Install Node on your machine (if not exists)

Step-3: Install yarn (if not exists)

sudo npm install -g yarn

Step-4: Install redis (if not exists)

brew install redis

Step-5: Make a directory and create a virtualenv inside the directory

python3 -m venv venv

Activate the virtualenv

source venv/bin/activate

Step-6: Install frappe bench

pip install frappe-bench

Check bench version

bench --version

Step-7: Initialize bench project

bench init frappe-bench

Swith to the bench directory -

cd frappe-bench/

Step-8: Create first site on the project

bench new-site <site_name> --db-name <site_database_name>

for my case I will just create the site (database will be created automatically if not specified)

bench new-site site1.local

it will ask your some input

MySQL root password: (you have to give your database root password)
Set Administrator password: (set your password and remember it will be needed to login your dashboard)
Re-enter Administrator password:

Step-9: Get ERP Next from git repo

bench get-app erpnext https://github.com/frappe/erpnext

Step-10: Get Payment module which is also required

bench get-app payments

Step-11: Install ERP next in your created site

bench --site site1.local install-app erpnext

Step-12: Run your app

bench start

Now try to access from your browser http://127.0.0.1:8000. but it might not be accessible.

So,

Final Step:

sudo nano /etc/hosts

Add the following line at the bottom-

127.0.0.1 site1.local

Now try to browse http://site1.local:8000/

You have to now enter the login credentials. The default username will be Administrator

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