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
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!
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)
sudo npm install -g yarn
brew install redis
python3 -m venv venv
Activate the virtualenv
source venv/bin/activate
pip install frappe-bench
Check bench version
bench --version
bench init frappe-bench
Swith to the bench directory -
cd frappe-bench/
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:
bench get-app erpnext https://github.com/frappe/erpnext
bench get-app payments
bench --site site1.local install-app erpnext
bench start
Now try to access from your browser http://127.0.0.1:8000. but it might not be accessible.
So,
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