-
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 without the beta installer.
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.
XCode Copy Paste to terminal:
xcode-select --install
When that's done agree to the license by opening xcode or by typingsudo xcodebuild -license
Homebrew Copy Paste to terminal:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Usage:
brew install 'package name' brew list # See all installed pachages brew doctor # Fix things brew update # Update, suggestion once a day
Brew Cask Copy Paste to terminal:
brew tap caskroom/cask
Usage: Install Mac Os applications brew cask install 'app_name'
Everything Else
- iTerm2 (an better terminal)
brew cask install iterm2
- Atom (Github free editor)
brew cask install atom
- ZSH (an better bash)
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
- Install python (via brew will update the allready installed python to brew links)
brew install python
- GIT
brew install git
- node.js (will give you access to npm)
brew install node
- redis
brew install redis
- Mariadb
brew install mariadb
mysql.server start
Please runmysql_secure_installation
right after to secure and set root password (mandatory)
- Wkhtmltopdf
brew cask install Caskroom/cask/wkhtmltopdf
- Installing Virtualenvwrapper
pip install virtualenvwrapper
- Adding virtualenvwrapper to your ~/.zshrc ZSH config
atom ~/.zshrc
then find the lineplugins
(probably around 52) and change it toplugins=(git virtualenvwrapper)
- Install ipython
pip install ipython
to do magical things like running "ls" from within python.
- Update pip for python 2.7
pip install --upgrade pip
-
Install
emmet
andterminal plus
packages in atom Go to Atom -> Preferences -> Install and installemmet
Why? https://www.youtube.com/watch?v=Ufg7OKimjfM Also consider adding the pluginterminal plus
and enjoy turning atom into an IDE. -
Cleaning up brew and brew cask
brew cleanup --force
brew cask cleanup
this will clean up caches and free a lot of space
- Set up your development folder, typically in your user folder and clone the bench-repo into it
mkdir Dev
cd Dev
git clone https://github.com/frappe/bench bench-repo
- Install the bench-repo:
sudo pip install -e bench-repo
- Install the master branch of frappe-bench
bench init frappe-bench --frappe-branch master
- Change into the frappe-bench folder and install the master branch of ERPNext
cd frappe-bench
bench get-app erpnext https://github.com/frappe/erpnext.git --branch master
- Open my.cnf with Atom and make sure to add the required code
atom /usr/local/etc/my.cnf
please add:
[mysqld]
innodb-file-format=barracuda
innodb-file-per-table=1
innodb-large-prefix=1
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
[mysql]
default-character-set = utf8mb4
-
Make sure you have run
mysql_secure_installation
if you havent already set a root password, which is mandatory for the following steps. -
Make sure your mariadb server is running by
mysql.server start
-
If you have a messed up setup from previous bench it is recommended you check out if there is a DB in mariadb that should be dropped before continuing.
-
Install a new site
bench new-site site1.local
input mysql root password when prompted as set in
mysql_secure_installation
input admin user password you wish to set for website (attention! user is actually called "Administrator")
- Install the erpnext app for this new site
bench install-app erpnext
- Enable developer mode in
site_config.json
atom sites/site1.local/site_config.json
Please add "developer_mode": 1
like this, the rest stays:
{
"db_name": "1bd3e0294d",
"db_password": "jfhgsdfjgh35h34j",
"developer_mode": 1
}
- Update Frappe Bench
bench update
- Run frappe bench
bench start
-
Open your browser and enjoy Navigate to URL:
http://localhost:8000/#login
-
When you are done and before you start coding please type
python -c 'import this'
and carefully read it.
Custom Footer Page