π Pre-requisites
Ensure your system meets the following requirements:
Python 3.6+
Homebrew 3.6+
Node.js 14
Redis 5 (for caching and real-time updates)
MariaDB (for database-driven apps)
Yarn 1.12+ (JS dependency manager)
Pip 20+ (Python dependency manager)
π οΈ Step 1: Install Homebrew
Homebrew is a package manager for macOS that simplifies the installation of software.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
π Step 2: Install Git
Git is a version control system that tracks changes and facilitates collaboration.
brew install git
π Step 3: Install setuptools and pip
setuptools and pip help manage Python packages and dependencies.
sudo pip3 install setuptools
π Step 4: Install virtualenv
virtualenv helps create isolated Python environments.
sudo pip3 install virtualenv
ποΈ Step 5: Install MariaDB
MariaDB is an open-source relational database.
Follow the installation guide: π Install MariaDB on macOS
Run these commands to install and secure MariaDB:
brew install mariadb
mysql_install_db
mariadb-secure-installation
mariadb -u root -p
If pompted, set the MySQL root password. Otherwise, manually initialize it:
sudo mysql_secure_installation
π Step 6: Install MySQL Client
brew install mysql-client
π Step 7: Configure MariaDB for Unicode Support
Edit the MariaDB configuration:
sudo nano /opt/homebrew/mariadb/my.cnf
Add the following content:
[mysqld]
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
[mysql]
default-character-set = utf8mb4
Restart MariaDB:
brew services start mariadb
π΄ Step 8: Install Redis
Redis is used for caching and real-time updates.
brew install redis
π¦ Step 9: Install Node.js 14
Node.js is required for running ERPNextβs JavaScript dependencies.
brew install node
To manage Node versions, use NVM.
π Step 10: Install Yarn
Yarn is a fast, reliable JavaScript package manager.
sudo npm install -g yarn
π Step 11: Install wkhtmltopdf
wkhtmltopdf converts HTML pages to PDF documents.
brew install wkhtmltopdf
βοΈ Step 12: Install Frappe Bench
frappe-bench is the command-line tool for managing ERPNext installations.
sudo -H pip3 install frappe-bench
Verify the installation:
bench --version
π Step 13: Initialize the Frappe Bench
bench init frappe-bench --frappe-branch version-13
cd frappe-bench/
bench start
π Step 14: Create a New Site
bench new-site site1.local
If you encounter this error:
Expected value utf8mb4_unicode_ci, found value utf8mb4_general_ci
Fix it by updating the MariaDB configuration:
mariadb -u root -p
SET GLOBAL collation_server = 'utf8mb4_unicode_ci';
brew services restart mariadb
π Step 15: Install ERPNext
Download and install the ERPNext app:
bench get-app erpnext --branch version-13
bench --site site1.local install-app erpnext
bench --site site1.local add-to-hosts
bench start
β Access ERPNext
Visit the following URL in your browser:
http://site1.local:8000/
Leave a comment