Manually Install ERPNext on a Manual Install of Frappe

Manually Install ERPNext on a Manual Install of Frappe

Tags :

Category : How-to

Get Social!

erpnext-screenERPNext is an Enterprise Resource Planning suite similar to Odoo. It manages every aspect of your business from time and expense tracking and payroll to invoicing and manufacturing.

Installing ERPNext is simple enough if you go with their automated approach, but can be a little more tricky when you’re wanting to control where services are. The automated install assumes everything is on the same box however it’s very likely you’ll have your database installed elsewhere.

ERPNext uses a Python framework called Frappe which must be installed before you can use ERPNext. This guide assumes you’ve completed the previous post in this series of manually installing Frappe.

To install ERPNext into your existing Frappe install, change to the frappe user and install the erpnext app.

su - frappe
bench get-app erpnext https://github.com/frappe/erpnext

Login to your SQL server (this can be MySQL or MariaDB) and create a new database for the ERPNext installation.

create database erpnext;

Add a user with all privalages on the database.

GRANT ALL PRIVILEGES ON erpnext.* TO 'root'@'erphost' IDENTIFIED BY 'password' WITH GRANT OPTION;

Replace erphost with your IP address of the server hosting Frappe and ERPNext and password with the password you would like to use for this remote root user.

Run the commands on the Frappe host to create a new site for the ERPNext installation.

bench new-site site1.local --db-name erpnext --mariadb-root-username root --mariadb-root-password password --install-app erpnext --verbose --force

Again, replace password with the password of the root user we just created.

The database tables and core data should now be installed and you’ll be prompted for an administrator username. This will be the initial username that you use to access the front page site.

Create a config for Bench, Nginx and Supervisor and copy them into place:

bench setup procfile
bench setup nginx
bench setup supervisor
cp /home/frappe/frappe-bench/config/nginx.conf /etc/nginx/sites-available/default
cp /home/frappe/frappe-bench/config/supervisor.conf /etc/supervisor/conf.d/supervisor.conf

And that’s it – restart everything and your ERPNext site should be accessible from http://ip-address/

service nginx restart
service supervisor restart

 


13 Comments

Cherly Rittie

13-Jun-2015 at 4:44 am

I just decided to clone the bench repo instead and do a pip install so I have it working now or so I hope. I will check if I can install erpnext from the here onwards.

Pratik Vyas

15-Jun-2015 at 6:59 am

Hey, author of “bench” here :)

Nice job explaining! Just curious why did you create the erpnext database and manually grant perms on it? `bench new-site` does all of that.

    james.coyle

    15-Jun-2015 at 11:51 am

    Hey Pratik,

    At the time I didn’t realise that it would be done automatically if I specified the names manually. In fact, I don’t like that it does. It’s fine to have the automatic process available but for people who run this in a serious production environment, it should be managed by a DBA. This is the whole reason why I manually-ish installed everything – so that each component could be installed where I wanted, how I wanted.

      Pratik Vyas

      25-Nov-2015 at 6:33 pm

      Yup! Makes sense.

John creator

29-Jun-2015 at 8:53 am

When I run this, it showing this error. Do you know which part I’m missing?

cp /home/frappe/frappe-bench/config/nginx.conf /etc/nginx/sites-available/default

Error:
cannot create regular file ‘/etc/nginx/sites-available/default’: No such file or directory

I followed these steps:

1) wget https://raw.githubusercontent.com/frappe/bench/master/install_scripts/setup_frappe.sh

2) sudo bash setup_frappe.sh

3) bench init frappe-bench
4) cd frappe-bench
5) bench get-app erpnext https://github.com/frappe/erpnext
6) bench new-site site1.local
7) bench install-app erpnext

    james.coyle

    29-Jun-2015 at 9:22 am

    Do you have Nginx installed?

    What does service nginx status give you?

William

11-Mar-2016 at 10:12 pm

Is this for version 6?

    james.coyle

    11-Mar-2016 at 10:41 pm

    Yes.

bledfort

26-Aug-2016 at 3:52 pm

I’m new to ubuntu, I installed it in virtual machine. I wish there is a video of how to install erpnext locally on ubuntu or at least some written step by step

Leo Glez

7-Sep-2016 at 5:36 pm

When i try to run this sentence: bench new-site site1.local –db-name erpnext –mariadb-root-username root –mariadb-root-password password –install-app erpnext –verbose –force

I have this error Error: no such option: –db-name and If i run onlye bench new-site site1.local The error say ” frappe app is not installed”

Can you help me, plis?

Jason

28-Jan-2017 at 1:49 pm

Please help. I’ve tryed to run this on CentOs 7 on my vps and on a newly installed vm. All I get is the following:
$frapper: :: bench get-app erpnext https://github.com/frappe/erpnext

INFO:bench.app:getting app
Traceback (most recent call last):
File “/bin/bench”, line 11, in
load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()
File “/home/frappe/bench-repo/bench/cli.py”, line 40, in cli
bench_command()
File “/usr/lib64/python2.7/site-packages/click/core.py”, line 722, in __call__
return self.main(*args, **kwargs)
File “/usr/lib64/python2.7/site-packages/click/core.py”, line 697, in main
rv = self.invoke(ctx)
File “/usr/lib64/python2.7/site-packages/click/core.py”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/lib64/python2.7/site-packages/click/core.py”, line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/lib64/python2.7/site-packages/click/core.py”, line 535, in invoke
return callback(*args, **kwargs)
File “/home/frappe/bench-repo/bench/commands/make.py”, line 30, in get_app
get_app(git_url, branch=branch)
File “/home/frappe/bench-repo/bench/app.py”, line 55, in get_app
shallow_clone = ‘–depth 1’ if check_git_for_shallow_clone() else ”
File “/home/frappe/bench-repo/bench/utils.py”, line 311, in check_git_for_shallow_clone
if get_config(“.”).get(‘release_bench’):
File “/home/frappe/bench-repo/bench/config/common_site_config.py”, line 24, in get_config
return get_common_site_config(bench_path)
File “/home/frappe/bench-repo/bench/config/common_site_config.py”, line 31, in get_common_site_config
return json.load(f)
File “/usr/lib64/python2.7/json/__init__.py”, line 290, in load
**kw)
File “/usr/lib64/python2.7/json/__init__.py”, line 338, in loads
return _default_decoder.decode(s)
File “/usr/lib64/python2.7/json/decoder.py”, line 369, in decode
raise ValueError(errmsg(“Extra data”, s, end, len(s)))
ValueError: Extra data: line 17 column 1 – line 21 column 1 (char 448 – 495)

Tiwiex

5-Nov-2017 at 1:32 am

Nice. I see you have a better understanding of ERPNext. Installing manually seems like the right thing for a sys admin. Which is how I got here. I grabbed a quick understanding of Frappe from your simple post.

I installed using the wizard. Everything worked fine for months, then it all came crashing down. Fortunately, I had a backup. Maybe not up to date but fair enough.
I reinstalled erpnext (using the bl%$%@y wizard again) and the install went well. I did a restore over the database and the site stopped working with errors. “Unknown column “send_me_a_copy”. I have googled and prayed but everything seems unclear for now.

1. I suspect erpnext version might be different (i guess the wizard installs the latest). Sadly, i don’t know what version i had installed.
2. bench version shows – erpnext 9.2.4, frappe 9.2.6
3. I think I must have had version 8 then (not sure) but it was about May I backed up and I installed around March.
4. I did a checkout of a version 8.6.5 for Frappe and erpnext but running bench re-install still shows version 9

I guess I have had a lot of fun doing it the manual way so far. I see all my interesting info in the .sql backup but arhhh, still can’t restore succesfully.

I would appreciate any advice or help you can give. You would be my man of the year. lol. Let me get back to googling. Thanks so much.

    James Coyle

    6-Nov-2017 at 1:59 pm

    Are you able to do a database comparison? If you can install a fresh version somewhere, then restore your DB backup to a different database and compare the two – you might get some insight into what the changes are.

Leave a Reply

Visit our advertisers

Quick Poll

What type of VPN protocol do you use?

Visit our advertisers