Frappe installation in digitalocean ubuntu

Hello,

I am trying to install frappe in digitalocean. I tried the steps in the link https://github.com/frappe/frappe-bench.

But when I tried to run ./scripts/install.sh single [sitename [dbname]] , I got error saying
./scripts/install.sh: line 33: frappe: command not found

Please help me with this asap

Also when i tried to follow easy installation step it resulted in the following error

root@xyzak:~# sudo bash setup_frappe.sh
Installing for Ubuntu trusty amd64
In case you encounter an error, you can post on https://discuss.frappe.io

Adding ubuntu mariadb repo
Installing packages for Ubuntu. This might take time…
Installing wkhtmltopdf

  • Stopping MariaDB database server mysqld [ OK ]
  • Starting MariaDB database server mysqld [ OK ]
  • Checking for corrupt, not cleanly closed and upgrade needing tables.
    Adding frappe user
    Installing frappe-bench
    Setting up first site
    Installing frappe…
    Updating frappe : [============================ ]Traceback (most recent call last):
    File “/usr/lib/python2.7/runpy.py”, line 162, 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 “/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 77, in
    main()
    File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 14, in main
    click.Group(commands=commands)(prog_name=‘bench’)
    File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 610, in call
    return self.main(*args, **kwargs)
    File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 590, in main
    rv = self.invoke(ctx)
    File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 936, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
    File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 936, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
    File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 782, in invoke
    return ctx.invoke(self.callback, **ctx.params)
    File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 416, in invoke
    return callback(*args, **kwargs)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/commands.py”, line 65, in new_site
    _new_site(db_name, site, mariadb_root_username=mariadb_root_username, mariadb_root_password=mariadb_root_password, admin_password=admin_password, verbose=verbose, install_apps=install_app, source_sql=source_sql, force=force)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/commands.py”, line 85, in _new_site
    _install_app(“frappe”, verbose=verbose, set_as_patched=not source_sql)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/installer.py”, line 122, in install_app
    sync_for(name, force=True, sync_everything=True, verbose=verbose)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/model/sync.py”, line 43, in sync_for
    import_file_by_path(doc_path, force=force)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/import_file.py”, line 54, in import_file_by_path
    import_doc(doc, force=force, data_import=data_import)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/import_file.py”, line 120, in import_doc
    doc.insert()
    File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 185, in insert
    self.run_post_save_methods()
    File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 568, in run_post_save_methods
    self.run_method(“on_update”)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 516, in run_method
    return Document.hook(fn)(self, *args, **kwargs)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 629, in composer
    return composed(self, method, *args, **kwargs)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 612, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
    File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 510, in
    fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py”, line 113, in on_update
    self.run_module_method(“on_doctype_update”)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py”, line 122, in run_module_method
    module = load_doctype_module(self.name, self.module)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/init.py”, line 62, in load_doctype_module
    doctype_python_modules[key] = frappe.get_module(get_module_name(doctype, module, prefix))
    File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 524, in get_module
    return importlib.import_module(modulename)
    File “/usr/lib/python2.7/importlib/init.py”, line 37, in import_module
    import(name)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/email/doctype/email_alert/email_alert.py”, line 30
    if method = “daily”:
    ^
    SyntaxError: invalid syntax

We just released a fix for the issue.

Also, if you want stable version 4, pass --setup-production, it will install v4 and setup for production (ie. running on port 80)

I created a new droplet and ran the easy installation steps. Everything went fine i connected putty through port 22. and when i run browser using droplet ip:22 i am not able to access my site it says webpage not available. When i run droplet ip on server it says

Welcome to nginx!

If you see this page, the nginx web server is successfully installed and working. Further configuration is required.

For online documentation and support please refer to nginx.org.
Commercial support is available at nginx.com.

Thank you for using nginx.

Please help me with this…

my command line:

erpnextw@erpnextw:~/frappe-bench$ bench new-site site1.local
MySQL root password:
Traceback (most recent call last):
File “/usr/lib/python2.7/runpy.py”, line 162, 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 “/home/erpnextw/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 77, in
main()
File “/home/erpnextw/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 14, in main
click.Group(commands=commands)(prog_name=‘bench’)
File “/home/erpnextw/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 610, in call
return self.main(*args, **kwargs)
File “/home/erpnextw/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 590, in main
rv = self.invoke(ctx)
File “/home/erpnextw/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 936, in invoke
return process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/erpnextw/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 936, in invoke
return process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/erpnextw/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 782, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/erpnextw/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 416, in invoke
return callback(*args, **kwargs)
File “/home/erpnextw/frappe-bench/apps/frappe/frappe/commands.py”, line 65, in new_site
new_site(db_name, site, mariadb_root_username=mariadb_root_username, mariadb_root_password=mariadb_root_password, admin_password=admin_password, verbose=verbose, install_apps=install_app, source_sql=source_sql, force=force)
File “/home/erpnextw/frappe-bench/apps/frappe/frappe/commands.py”, line 83, in new_site
install_db(root_login=mariadb_root_username, root_password=mariadb_root_password, db_name=db_name, admin_password=admin_password, verbose=verbose, source_sql=source_sql,force=force, reinstall=reinstall)
File “/home/erpnextw/frappe-bench/apps/frappe/frappe/installer.py”, line 31, in install_db
create_database_and_user(force, verbose)
File “/home/erpnextw/frappe-bench/apps/frappe/frappe/installer.py”, line 53, in create_database_and_user
raise Exception(“Database %s already exists” % (db_name,))
Exception: Database 1bd3e0294d already exists
erpnextw@erpnextw:~/frappe-bench$ ^C
erpnextw@erpnextw:~/frappe-bench$ bench start
00:50:01 system | workerbeat.1 started (pid=16137)
00:50:01 system | redis_cache.1 started (pid=16138)
00:50:01 redis_cache.1 | [16144] 27 Mar 00:50:01.975 # Unable to set the max number of files limit to 10032 (Operation not permitted), setting the max clients configuration to 3984.
00:50:01 redis_cache.1 | .
00:50:01 redis_cache.1 | .-__ ''-._ 00:50:01 redis_cache.1 | _.- . . ‘’-.
Redis 2.8.4 (00000000/0) 64 bit
00:50:01 redis_cache.1 | .- .-```. ```\/ _.,_ ''-._ 00:50:01 redis_cache.1 | ( ' , .-` | `, ) Running in stand alone mode 00:50:01 redis_cache.1 | |`-._`-...-` __...-.-.
|'_.-'| Port: 11311 00:50:01 redis_cache.1 | | -.
._ / _.-' | PID: 16144 00:50:01 redis_cache.1 | -.
-._ -./ .-’ .-’
00:50:01 redis_cache.1 | |-._-.
-.__.-' _.-'_.-'| 00:50:01 redis_cache.1 | | -.
-._ _.-'_.-' | http://redis.io 00:50:01 redis_cache.1 | -.
-._-.__.-'
.-’ .-’
00:50:01 redis_cache.1 | |-._-.
-.__.-' _.-'_.-'| 00:50:01 redis_cache.1 | | -.-._ _.-'_.-' | 00:50:01 redis_cache.1 | -. -._-..-‘_.-’ _.-’
00:50:01 redis_cache.1 | -._ -.
.-’ _.-’
00:50:01 redis_cache.1 | -._ _.-' 00:50:01 redis_cache.1 | -.__.-’
00:50:01 redis_cache.1 |
00:50:01 redis_cache.1 | [16144] 27 Mar 00:50:01.989 # Server started, Redis version 2.8.4
00:50:01 redis_cache.1 | [16144] 27 Mar 00:50:01.989 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add ‘vm.overcommit_memory = 1’ to /etc/sysctl.conf and then reboot or run the command ‘sysctl vm.overcommit_memory=1’ for this to take effect.
00:50:01 redis_cache.1 | [16144] 27 Mar 00:50:01.989 * The server is now ready to accept connections on port 11311
00:50:01 system | web.1 started (pid=16136)
00:50:01 web.1 | /bin/sh: 1: ./env/bin/frappe: not found
00:50:01 system | web.1 stopped (rc=127)
00:50:01 system | worker.1 started (pid=16139)
00:50:01 system | sending SIGTERM to worker.1 (pid 16139)
00:50:02 system | sending SIGTERM to redis_cache.1 (pid 16138)
00:50:02 system | sending SIGTERM to workerbeat.1 (pid 16137)
00:50:02 redis_cache.1 | [16144 | signal handler] (1427431802) Received SIGTERM, scheduling shutdown…
00:50:02 redis_cache.1 | [16144] 27 Mar 00:50:02.001 # User requested shutdown…
00:50:02 redis_cache.1 | [16144] 27 Mar 00:50:02.001 # Redis is now ready to exit, bye bye…
00:50:02 system | redis_cache.1 stopped (rc=-15)
00:50:02 system | workerbeat.1 stopped (rc=-15)
00:50:02 system | worker.1 stopped (rc=-15)

Please help me asap… pleaseeeee…

You didn’t pass --setup-production

Destroy + rebuild your droplet and run these two commands exactly,

wget https://raw.githubusercontent.com/frappe/bench/master/install_scripts/setup_frappe.sh
sudo bash setup_frappe.sh --setup-production

Then, if you put your droplet’s ip in the browser, you should see the login screen.

Thanks a lot. Now it worked.

Now i can view my site using droplet ip.How can i make like qbicsproducts.in

cant we use manual install here,and if we do this install are we able to edit and create new apps and sites?