Guide: Ubuntu 18.04 - Easy Install

Hello everyone,

I have made a way to make Easy Install work on Ubuntu 18.04. You can view my fork at iRaySpace/bench.

I have made some changes to the following files:

  • playbooks/install.py, where I added Ubuntu 18.04 under check_distribution_compatibility()
  • playbooks/roles/mariadb/defaults/main.yml, where I changed the MariaDB version to 10.3.
  • playbooks/roles/mariadb/tasks/main.yml, where I inserted a condition for ubuntu-bionic.yml. I excluded the override of mariadb.cnf. Added the override to the /etc/mysql/mariadb.conf.d/frappe.cnf, with the following contents, which can be found when using bench new-site command:

[mysqld]
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci

[mysql]
default-character-set = utf8mb4

  • playbooks/roles/mariadb/tasks/ubuntu-bionic.yml, where I added the repo file together with the repo key.
  • playbooks/roles/mariadb/tasks/mysql_secure_installation.yml, little fix to mysql commands.

You can try this easy install procedure.

sudo apt-get update
sudo apt-get install python-minimal
wget https://raw.githubusercontent.com/iRaySpace/bench/master/playbooks/install.py
sudo python install.py --production --user frappe

Let me know what you think.

Regards,

iRaySpace
Bai Web and Mobile Lab

4 Likes

Hello, is it possible to get an easy install for ubuntu 17?
I’m having ubuntu-17.10.1-desktop and wanted to run ERPNext in it. Been having trouble to install.
Thanks

@iRaySpace frappe bench is already compatible with Ubuntu 18.04

2 Likes

Hello @codingCoffee

Thanks for the information. I wasn’t updated with the latest commits.

Better go with the Stable version of Ubuntu, You may not get proper updates for other versions.
Ubuntu 17.X is already out of date.

https://wiki.ubuntu.com/Releases

Hello @deatram,

At what point were you stucked with installing the ERPNext on Ubuntu 17?

1 Like

I managed to install using manual steps but it can with
Installed Apps
ERPNext: v11.x.x-develop () (develop)
Frappe Framework: v11.x.x-develop () (develop)

What is the safe way to switch to master without breaking my apps? or switch to staging?

I running this on ubuntu 17.10.1 desktop, not virtual machine. so my concern is breaking my installation.

I tried to run the install upgrade from 16.04 to 18.04 on DigitalOcean and it broke it. Had to revert to snapshot in order to get MariaDB connection back…

@iRaySpace
Im novice and tried with your easy way in Ubuntu 18.04 but ended up with errors -

TASK [mariadb : Add repo key] **************************************************
fatal: [localhost]: FAILED! => {“changed”: false, “cmd”: “/usr/bin/apt-key adv --keyserver keyserver.ubuntu.com --recv F1656F24C74CD1D8”, “msg”: “Error fetching key F1656F24C74CD1D8 from keyserver: keyserver.ubuntu.com”, “rc”: 2, “stderr”: “Warning: apt-key output should not be parsed (stdout is not a terminal)\ngpg: keyserver receive failed: Server indicated a failure\n”, “stderr_lines”: [“Warning: apt-key output should not be parsed (stdout is not a terminal)”, “gpg: keyserver receive failed: Server indicated a failure”], “stdout”: “Executing: /tmp/apt-key-gpghome.0QUC5qmO8D/gpg.1.sh --keyserver keyserver.ubuntu.com --recv F1656F24C74CD1D8\n”, “stdout_lines”: [“Executing: /tmp/apt-key-gpghome.0QUC5qmO8D/gpg.1.sh --keyserver keyserver.ubuntu.com --recv F1656F24C74CD1D8”]}
to retry, use: --limit @/tmp/.bench/playbooks/site.retry

PLAY RECAP *********************************************************************
localhost : ok=10 changed=7 unreachable=0 failed=1

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

Pls help me out…

Hello @jchakma

Try using GitHub - frappe/bench: CLI to manage Multi-tenant deployments for Frappe apps instead.

i have changed files according to your suggessions which given above.

TASK [swap : Create swap space] ****************************************************************************************************************************************************************************

fatal: [localhost]: FAILED! => {“msg”: “The conditional check ‘production and not container’ failed. The error was: error while evaluating conditional (production and not container): ‘container’ is undefined\n\nThe error appears to have been in ‘/tmp/.bench/playbooks/roles/swap/tasks/main.yml’: line 1, 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: Create swap space\n ^ here\n”}

I got the following error then i copy past the content of thi sfile also as well “bench/playbooks/roles/swap/tasks/main.yml”

Hello @Suresh_Alien,
Just follow the official installation method provided by the Frappe now. The Ubuntu 18.04 is already supported.

1 Like