Ubuntu 16.04 installing in already used server

hello
i am trying to install in Ubuntu 16.04.3 LTS, which i was using already with MySQL server where i had my database.

Following the Easy Install Instruction

  1. #wget https://raw.githubusercontent.com/frappe/bench/master/playbooks/install.py
  2. sudo python install.py --production

during the step four it asked, my MySQL root password, it thought it will be for creating some tables.
i got below error

RUNNING HANDLER [mariadb : restart mysql] ****************************************************************************************************************
to retry, use: --limit @/tmp/.bench/playbooks/production/install.retry

PLAY RECAP ***********************************************************************************************************************************************
localhost : ok=46 changed=32 unreachable=0 failed=1

Traceback (most recent call last):
File “install.py”, line 386, in
install_bench(args)
File “install.py”, line 112, in install_bench
run_playbook(‘production/install.yml’, sudo=True, extra_vars=extra_vars)
File “install.py”, line 324, 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’, ‘production/install.yml’, ‘-e’, ‘@/tmp/extra_vars.json’, ‘–become’, ‘–become-user=frappe’]’ returned non-zero exit status 2

Also after this when i checked my MySQL database all are gone. thankfully my data was in different partition was able to recover it.

My Query to ERP Next Team

  1. When installing why MariaDB was not installed as parallel
  2. Why there was no message/ warning that existing MySQL will be changed to MariaDB
  3. What is the above error
  4. Do you have any instruction with which i can install it in my server where already MySQL is running and i do not want to disturb it. Or can we use MySQL as the database for ERPNext ?

Are you running the installation with root user or frappe user? You can check instructions here for manual install as well.

  1. MariaDB and MySQL cannot be installed in parallel
  2. The install script is made to be used on a fresh server
  3. The error log is not really helpful. If you could replicate the error, try running with verbose flag and post a few lines above RUNNING HANDLER [mariadb : restart mysql] as well
  4. You could try a manual installation using this guide but skip the MariaDB installation part, since you already have MySQL installed. However, you’ll have to add the following to your mysql my.cnf file
[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

I don’t know how far this would get you, but you can always try. Please always have a backup of your database before trying anything.


Another way I can think of doing this is to take a backup of your existing mysql database into a .mysql file, installing ERPNext on a fresh server using the install script, and then using bench restore path/to/backup.mysql to restore your database

1 Like

i will try these and update
also can you tell me minimum required RAM for this , i am planning to use Ubuntu 16.04?

From Frappe Bench GitHub

If you are using on a VPS make sure it has >= 1Gb of RAM or has swap setup properly.

1 Like

i am planning to test it out in my VM and same i am planning to do in the Amazon Lightsail
https://aws.amazon.com/lightsail/

so which one is should be selecting , i wont work in 512MB RAM? my user base will only only around 10

I doubt the user base will have to do much with the RAM, it’s more about the bench and its dependencies running.

Maybe others can answer this query better.