-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Turning a Mac into a Frappe Framework Developer Machine
This short instruction explains how to get your Mac OS X machine to be a development platform for Frappe and ERPNext as well as showing how to install Frappe in Developer Mode.
Attention, this gives you more control about what is happening but is harder than the installer. However this is setting up a development framework rather than a quick test of frappe framework. So if you want to try out ERPNext development maybe consider the vagrantfile or the automated setup, if you want a real development machine, consider this tutorial. You are highly recommended to start with a fresh machine here unless you are a mac wizz in which case you won't need this instruction to begin with.
This works best with a clean setup / install.
Any development on a Mac starts with a Homebrew install.
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
(check the brew.sh homepage for the latest script). Homebrew will also install XCode Command Line Tools
. If you are unable to install it via the homebrew script, you can download command line tools from the Apple Developer Website
https://developer.apple.com/download/more/
MacOS (upto 10.4) comes with Python 2 as the default, so its best to install Python 3, which is the latest and greatest python
brew install python3
Change your default Python to 3 by adding the following to your ~/.bash_profile
alias python='python3'
alias python2='/usr/bin/python'
alias pip='pip3'
Frappe requires MariaDB as the default database backend and Redis for caching.
brew install mariadb redis
Setup your default MariaDB passwords using the mysql_secure_installation
utility. Just follow the prompts to set your default root password
mysql_secure_installation
Start MySQL by
mysql.server start
Frappe (version 11) uses Node v10 so you can manage your node installs using the awesome Node Version Manager (nvm)
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
Then install Node v10
nvm install v10
mkdir Dev
cd Dev
git clone https://github.com/frappe/bench bench-repo
pip install -e bench-repo
bench init frappe-bench
cd frappe-bench
bench get-app erpnext https://github.com/frappe/erpnext.git
please add:
[mysqld]
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
[mysql]
default-character-set = utf8mb4
Start Bench on a terminal with:
bench start
If all goes well, open another Terminal tab and create a new site.
bench new-site site1.local`
Update the site to your /etc/hosts
so you can run it locally. Add the following line to your /etc/hosts
127.0.0.1 site1.local
bench install-app erpnext
Add "developer_mode": 1
in your sites/site1.local/site_config.json
like this, the rest stays:
{
"db_name": "1bd3e0294d",
"db_password": "jfhgsdfjgh35h34j",
"developer_mode": 1
}
bench update
Navigate to URL: http://site1.local:8000/#login
Custom Footer Page