Skip to content

How to Install ERPNext

anandpdoshi edited this page Mar 16, 2012 · 23 revisions

Note:

You will need some linux background to be able to install this on your system.

These are high-level instructions and by no means cover every installation issue.

Pre-requisites:

  • any unix based os
  • python 2.6+ (python 3+ not supported)
  • apache
  • mysql 5+
  • git
  • python MySQLdb
  • pytz
  • jinja2
  • markdown2

Steps: (replace contents written like {something} with appropriate data)

  1. go to a folder where you want to install erpnext. (This folder should be accessible to apache)
  2. git clone [email protected]:webnotes/erpnext.git
  3. go to erpnext folder
  4. git clone [email protected]:webnotes/wnframework.git lib
  5. mkdir logs
  6. touch ./logs/error_log.txt
  7. go to ./lib/py/webnotes
  8. copy defs_template.py defs.py
  9. edit defs.py (make sure that you write full paths. see example below.)
  10. go back to erpnext folder
  11. gunzip ./data/master.sql.gz
  12. ensure mysql service is running
  13. ./wnf.py --install {mysql_root_password} {new_db_name} data/master.sql
  14. ./wnf.py -d {new_db_name} --sync_with_gateway 0 (This step will get deprecated very soon)
  15. edit apache configuration file (or create an erpnext.conf file. see example below)
  16. restart apache service
  17. start your browser and go to localhost/erpnext
  18. login as user: Administrator and password: admin

What to write in defs.py?

## paths should be accessible by apache
## these are minimum settings required to get you started

default_db_name = '{new_db_name}'
db_password = '{mysql_root_password}'
files_path = '{full path to a folder where attachments should be saved}'
modules_path = '{full path to erpnext}/erpnext/'
log_file_name = '{full path to erpnext}/logs/error_log.txt'

What to write in apache configuration file?

<VirtualHost *:80>
	ServerName *
	DocumentRoot {full path to erpnext folder}/
	AddHandler cgi-script .cgi .xml
	Options -Indexes +FollowSymLinks +ExecCGI
	RewriteEngine on
	RewriteRule \.py - [F]
	## uncomment below lines if required
	#Order allow,deny
	#Allow from all
	DirectoryIndex index.html index.cgi
</VirtualHost>

Attributions: Thanks to Sudev KK for contributing to the setup steps.