Fool proof install - step by step

I’d advise against the Easy Install install.py, and go for a manual installation. The best publicly available guide I’ve seen is this:

The Hitchhiker’s Guide to Installing Frappe on Linux

Before installing, take time to make sure your MariaDB database is online, and can be accessed using the the root password.

If you get stuck, there’s now an ERPNext Public Help channel on Telegram: Telegram: Contact @erpnexthelp. Plenty of us lurk there. :slightly_smiling_face:

1 Like

Hi,
I had some weeks ago the same problem until I found a solution after trial and error many times. Please look at ERPNext DNS-Multitenant - disable recursion on the DNS Server - #4 by Curt.Beck.

Today I started a new installation in combination with wordpress. The result was, that the easy install script doesn’t work anymore. I don’t get it. How can this happen? I’m not a Linux Pro, I just want to use ERPNext! The thing with easy open source is not valid for ERPNext, you need a professinal. I really don’t get it. What is the problem for a professional coder to code a installation routine which just works?!

I think the challange should be to use and adapt ERPNext, not to install it.

Maybe there is an IT and ERPNext-Master who can do this for all people all over the world? We need your help!

Thank you in advance!

PS: Can anybody currently install ERPNext? Which update of what causes the error during the installation?

1 Like

A fool proof install is no easy feat to specify if not code for - with users and computers, either end can quickly and easily outwit the other(!) - this forum is proof of that.

Plus to expect ERPNext to be all things to all people, and to simply work in all manner of host environments - is probably too ambitious, impractical and unsustainable a maintenance goal that no (paid or unpaid) person or organization would ever hope to realistically support.

1 Like

@Curt.Beck - I’ve got plenty to say on this topic. It deserves its own thread for another day.

But in the meantime. If you can please share your error, then I will try to help.

I’ve installed ERPNext many times, always manually. The Easy Install script and I are not friends. Nonetheless, I’m familiar with many of the usual errors. If you can share yours, I may be able to identify the cause, and offer some advice.

1 Like

Ok, I tried more ways, without reach the goal. I have a vserver with ubuntu 18lts. I reset the server before every new try.

My current installation routine is a combination of many proposed solutions:
sudo apt update && apt upgrade -y && apt autoremove -y
sudo apt-get install git
sudo apt-get install python-dev
sudo apt-get install python3-dev
sudo apt-get install python-setuptools python-pip
sudo apt-get install python3-setuptools python3-pip
alias python=python3
alias pip=pip3
sudo apt-get install software-properties-common
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
sudo add-apt-repository ‘deb [arch=amd64,i386,ppc64el] Index of /mirror/mariadb/repo/10.3/ubuntu/ xenial main’
sudo apt-get update
sudo apt-get install mariadb-server-10.3
sudo apt-get install libmysqlclient-dev
sudo nano /etc/mysql/my.cnf
[mysqld]
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci

[mysql]
default-character-set = utf8mb4

sudo service mysql restart
sudo apt-get install redis-server
sudo apt-get install curl
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt-get install -y nodejs
sudo npm install -g yarn
sudo useradd -m -s /bin/bash erpnext
sudo passwd erpnext
sudo usermod -aG sudo erpnext
sudo add-apt-repository ppa:nginx/stable
sudo apt-get update
sudo apt-get install nginx
sudo ufw allow ‘Nginx Full’
su - erpnext
nano .bashrc
PATH=$PATH:~/.local/bin/
logout
reboot
su - erpnext
git clone GitHub - frappe/bench: CLI to manage Multi-tenant deployments for Frappe apps
pip install -e ./bench
bench --version
bench init --frappe-branch version-12 --python /usr/bin/python3 frappe-bench
cd frappe-bench
./env/bin/pip3 install -e apps/frappe/
sudo mysql -u root -p
create database erpnextdb;
create user erpnext@localhost identified by ‘Password’;
GRANT ALL ON erpnextdb.* TO ‘erpnext’@‘localhost’ IDENTIFIED BY ‘Password’ WITH GRANT OPTION;
GRANT all privileges on . to ‘root’@‘localhost’ IDENTIFIED BY ‘Password1’ WITH GRANT OPTION;
FLUSH PRIVILEGES;
EXIT;
bench start
bench get-app --branch version-12 erpnext GitHub - frappe/erpnext: Free and Open Source Enterprise Resource Planning (ERP)

At the moment with the last line the following error occurs:
~/frappe-bench$ bench get-app --branch version-12 erpnext GitHub - frappe/erpnext: Free and Open Source Enterprise Resource Planning (ERP)
INFO:bench.app:getting app erpnext
INFO:bench.utils:git clone GitHub - frappe/erpnext: Free and Open Source Enterprise Resource Planning (ERP) --branch version-12 --depth 1 --origin upstream
fatal: destination path ‘erpnext’ already exists and is not an empty directory.
Traceback (most recent call last):
File “/home/erpnext/.local/bin/bench”, line 11, in
load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()
File “/home/erpnext/bench/bench/cli.py”, line 40, in cli
bench_command()
File “/home/erpnext/.local/lib/python3.6/site-packages/click/core.py”, line 764, in call
return self.main(*args, **kwargs)
File “/home/erpnext/.local/lib/python3.6/site-packages/click/core.py”, line 717, in main
rv = self.invoke(ctx)
File “/home/erpnext/.local/lib/python3.6/site-packages/click/core.py”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/erpnext/.local/lib/python3.6/site-packages/click/core.py”, line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/erpnext/.local/lib/python3.6/site-packages/click/core.py”, line 555, in invoke
return callback(*args, **kwargs)
File “/home/erpnext/bench/bench/commands/make.py”, line 41, in get_app
get_app(git_url, branch=branch)
File “/home/erpnext/bench/bench/app.py”, line 125, in get_app
cwd=os.path.join(bench_path, ‘apps’))
File “/home/erpnext/bench/bench/utils.py”, line 161, in exec_cmd
raise CommandFailedError(cmd)
bench.utils.CommandFailedError: git clone GitHub - frappe/erpnext: Free and Open Source Enterprise Resource Planning (ERP) --branch version-12 --depth 1 --origin upstream

What is my mistake?

Thank you!

Nope, its not working too. I got this:

Traceback (most recent call last):
  File "install.py", line 413, in <module>
    install_bench(args)
  File "install.py", line 135, in install_bench
    run_playbook('site.yml', sudo=True, extra_vars=extra_vars)
  File "install.py", line 327, in run_playbook
    success = subprocess.check_call(args, cwd=os.path.join(cwd, 'playbooks'))
  File "/usr/lib/python2.7/subprocess.py", line 541, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ansible-playbook', '-c', 'local', 'site.yml', '-vvvv', '-e', '@/tmp/extra_vars.json', '--become', '--become-user=nescafe']' returned non-zero exit status 2

Hi @Mohammad_Ahmad_Zulfi,

It used to work on Ubuntu 16, ive done it many atimes. But recently something changed and it stopped working.

Even the ubuntu 18 installation steps found on the forum worked about a month ago, I have a running VM which I done so, but when I tried a fresh one trying to show my dev team how to get erpnext up and running it fails. so definetly something changed.

Currently installing on a fresh ubuntu 16 no updates (desktop version) it fails at this step:

TASK [common : install pillow prerequisites for Ubuntu < 14.04] **************************************************
task path: /tmp/.bench/playbooks/roles/common/tasks/ubuntu.yml:3
[DEPRECATION WARNING]: Invoking “apt” only once while using a loop via squash_actions is deprecated. Instead of
using a loop to supply multiple items and specifying pkg: "{{ item }}", please use pkg: ['libjpeg8-dev', 'libtiff4-dev', 'tcl8.5-dev', 'tk8.5-dev'] and remove the loop. This feature will be removed in version 2.11.
Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
fatal: [localhost]: FAILED! => {
“msg”: “The conditional check ‘ansible_distribution_version | version_compare(‘14.04’, ‘lt’)’ failed. The error was: template error while templating string: no filter named ‘version_compare’. String: {% if ansible_distribution_version | version_compare(‘14.04’, ‘lt’) %} True {% else %} False {% endif %}\n\nThe error appears to be in ‘/tmp/.bench/playbooks/roles/common/tasks/ubuntu.yml’: line 3, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: install pillow prerequisites for Ubuntu < 14.04\n ^ here\n”
}

PLAY RECAP *******************************************************************************************************
localhost : ok=4 changed=1 unreachable=0 failed=1 skipped=1 rescued=0 ignored=0

Traceback (most recent call last):
File “install.py”, line 413, in
install_bench(args)
File “install.py”, line 135, in install_bench
run_playbook(‘site.yml’, sudo=True, extra_vars=extra_vars)
File “install.py”, line 327, in run_playbook
success = subprocess.check_call(args, cwd=os.path.join(cwd, ‘playbooks’))
File “/usr/lib/python3.5/subprocess.py”, line 581, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘[‘ansible-playbook’, ‘-c’, ‘local’, ‘site.yml’, ‘-vvvv’, ‘-e’, ‘@/tmp/extra_vars.json’, ‘–become’, ‘–become-user=frappe’]’ returned non-zero exit status 2

Why are you using Ubuntu 16?

I have the same issue!

Used it in the past and had no issue with easy install so just as a test to see if it would work, fails on both desktop and server versions

I tried in google cloud and got me similar errors.

We all would benefit from your successful installation experience, if you could write down the exact steps, commands, logs, gotcha notes, in one place, like a how-to guide.

I also have the same issue. The Easy Install fails on:

PLAY RECAP *******************************************************************************************************
localhost : ok=4 changed=1 unreachable=0 failed=1 skipped=1 rescued=0 ignored=0

Traceback (most recent call last):
File “install.py”, line 413, in
install_bench(args)
File “install.py”, line 135, in install_bench
run_playbook(‘site.yml’, sudo=True, extra_vars=extra_vars)
File “install.py”, line 327, in run_playbook
success = subprocess.check_call(args, cwd=os.path.join(cwd, ‘playbooks’))
File “/usr/lib/python3.5/subprocess.py”, line 581, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘[‘ansible-playbook’, ‘-c’, ‘local’, ‘site.yml’, ‘-vvvv’, ‘-e’, ‘@/tmp/extra_vars.json’, ‘–become’, ‘–become-user=frappe’]’ returned non-zero exit status 2

No matter what i try, it fails (Ubuntu 18.04 server)

Run the command on the command line by itself, without the quotes and commas

ansible-playbook -c local site.yml -vvvv -e @/tmp/extra_vars.json –become –become-user=frappe

I had the same problem, tearing my hair trying to figure out the issue.

Hi All,

the setup steps I followed here worked for me: How to install erpnext from A-Z

Done Excellent

this modification to the install got me over the line … after 2 years of misery!

2 Likes

Hi folks,

Is it now possible to install ERPnext? My last try was 2 months ago. I want to use the easy install routine.

Has anyone managed to get it running on Ubuntu 18.04 LTS?

thx to all

Hi Curt,

Possible, but no guarantees. Sometimes the easy install works, for some people. Other times it does not. As our comrade @bkm is fond of saying: Your mileage may vary

Many of us have ERPNext successfully running on Ubuntu 18.04 LTS. I’m finishing an installation on that OS right now, actually. But not using the easy install.

Best way to find out is to give it another try.