Guide: Manual Install ERPNext on Ubuntu 17.xx & 18.xx

Welcome to ERPNext Ahmed_K_A_Awwad

Please start a new thread that describes what it is you wish to do, and gives what steps you are following that arecausing your problems.

thanks

1 Like

Thanks
and okay Mr Clarkej

its for the example if you have created the site for domain access
bench new-site erp.netstaronline.com then you have to install the app on the site

1 Like

okay , i got it

Hi everyone, I want to install erpnext in ubuntu 18.04

I can’t run command bench init erpnext && cd erpnext in directory /opt/bench. if I do I get the following error;
Traceback (most recent call last): File "/home/frappe/.local/bin/bench", line 11, in <module> load_entry_point('bench', 'console_scripts', 'bench')() File "/opt/bench/bench-repo/bench/cli.py", line 40, in cli bench_command() File "/home/frappe/.local/lib/python2.7/site-packages/click/core.py", line 722, in __call__ return self.main(*args, **kwargs) File "/home/frappe/.local/lib/python2.7/site-packages/click/core.py", line 697, in main rv = self.invoke(ctx) File "/home/frappe/.local/lib/python2.7/site-packages/click/core.py", line 1066, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home/frappe/.local/lib/python2.7/site-packages/click/core.py", line 895, in invoke return ctx.invoke(self.callback, **ctx.params) File "/home/frappe/.local/lib/python2.7/site-packages/click/core.py", line 535, in invoke return callback(*args, **kwargs) File "/opt/bench/bench-repo/bench/commands/make.py", line 30, in init python = python) File "/opt/bench/bench-repo/bench/utils.py", line 54, in init os.makedirs(path) File "/usr/lib/python2.7/os.py", line 157, in makedirs mkdir(name, mode) OSError: [Errno 13] Permission denied: 'erpnext'

I don’t know how it works for you
please help me

Your problem is user account ‘erpnext’ requires sudo privileges

To setup sudo permissions for erpnext:
switch to root user then run ‘bench setup sudoers erpnext’

As per this Issue with Setting Up second site - #5 by nikzz

1 Like

Dear @clarkej thanks for replying, yes that was user problem I create another user it solved.
but now I have another problem when I create new site, it asking me for Mysql root password. when I enter it gives me the following errror

bench@mmerp:~/erpnext$ bench new-site erp.nawrooz.com
MySQL root password:
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/opt/bench/erpnext/apps/frappe/frappe/utils/bench_helper.py", line 97, in <module>
    main()
  File "/opt/bench/erpnext/apps/frappe/frappe/utils/bench_helper.py", line 18, in main
    click.Group(commands=commands)(prog_name='bench')
  File "/opt/bench/erpnext/env/local/lib/python2.7/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/opt/bench/erpnext/env/local/lib/python2.7/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/opt/bench/erpnext/env/local/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/opt/bench/erpnext/env/local/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/opt/bench/erpnext/env/local/lib/python2.7/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/opt/bench/erpnext/env/local/lib/python2.7/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/opt/bench/erpnext/apps/frappe/frappe/commands/site.py", line 34, in new_site
    verbose=verbose, install_apps=install_app, source_sql=source_sql, force=force)
  File "/opt/bench/erpnext/apps/frappe/frappe/commands/site.py", line 65, in _new_site
    admin_password=admin_password, verbose=verbose, source_sql=source_sql,force=force, reinstall=reinstall)
  File "/opt/bench/erpnext/apps/frappe/frappe/installer.py", line 38, in install_db
    create_database_and_user(force, verbose)
  File "/opt/bench/erpnext/apps/frappe/frappe/installer.py", line 62, in create_database_and_user
    if force or (db_name not in dbman.get_database_list()):
  File "/opt/bench/erpnext/apps/frappe/frappe/model/db_schema.py", line 554, in get_database_list
    return [d[0] for d in self.db.sql("SHOW DATABASES")]
  File "/opt/bench/erpnext/apps/frappe/frappe/database.py", line 166, in sql
    self.connect()
  File "/opt/bench/erpnext/apps/frappe/frappe/database.py", line 116, in connect
    charset='utf8mb4', use_unicode = True, conv = conversions, local_infile = self.local_infile)
  File "/opt/bench/erpnext/env/local/lib/python2.7/site-packages/pymysql/__init__.py", line 94, in Connect
    return Connection(*args, **kwargs)
  File "/opt/bench/erpnext/env/local/lib/python2.7/site-packages/pymysql/connections.py", line 327, in __init__
    self.connect()
  File "/opt/bench/erpnext/env/local/lib/python2.7/site-packages/pymysql/connections.py", line 598, in connect
    self._request_authentication()
  File "/opt/bench/erpnext/env/local/lib/python2.7/site-packages/pymysql/connections.py", line 852, in _request_authentication
    auth_packet = self._read_packet()
  File "/opt/bench/erpnext/env/local/lib/python2.7/site-packages/pymysql/connections.py", line 683, in _read_packet
    packet.check_error()
  File "/opt/bench/erpnext/env/local/lib/python2.7/site-packages/pymysql/protocol.py", line 220, in check_error
    err.raise_mysql_exception(self._data)
  File "/opt/bench/erpnext/env/local/lib/python2.7/site-packages/pymysql/err.py", line 109, in raise_mysql_exception
    raise errorclass(errno, errval)
pymysql.err.InternalError: (1698, u"Access denied for user 'root'@'localhost'")

and I solved mysql login issue according to @Parag_Kapoor guide .
I’m able to login to mysql using command sudo mysql -u root -p
please help me what to do

Dear @Parag_Kapoor I couldn’t understand mysql_native_password can you please help me out,

what the command UPDATE user SET plugin='mysql_native_password' WHERE User='root'; mean?

eh ! solved
by running the command UPDATE user SET plugin='mysql_native_password' WHERE User='root'; but don’t know what this command does?

in mysql and maria db login plugin is not secured by default this command sets the instance to login with password only

1 Like

Ok Thanks I got now,

Dear @Parag_Kapoor my installation done successfully
my previous ERPNext crashed, fortunately I configured Dropbox, I have my data but I couldn’t find a step by step restore, I want to restore my database and all my files.
can you please refer me to a link or source?
your tutorial for Manual installation of ERPNext realy helped me.

thanks

you can download the file to your machine and restore the files & Database

1 Like

i have downloaded but don’t know how to restore it

set-up your site put private files under sites/site$$/Private/Files/ && Public Files under sites/Site$$/Public/Files replace site$$ with your sitename

put database at any of the path which can be accessed without su run the command
bench --site Site$$ --force restore [Path to SQL Backup]

1 Like

thank you
that perfect

done perfectly, thank you so much

thank you :slight_smile:

when i run a command i got following errors:-

bench@root1-VirtualBox:~$ sudo pip install -e bench-repo
[sudo] password for bench:
Sorry, try again.
[sudo] password for bench:
Sorry, try again.
[sudo] password for bench:
sudo: 3 incorrect password attempts

You need to supply the login password for the user named “bench”.

You need to supply the login password for the user named “bench”.**
how can i do this?