Installing ERPNext on a Ubuntu 14.04 VPS

I am really new to ERPNext. Now I’m trying to install ERPNext on a Ubuntu 14.04 VPS. Following the documentation, I’ve entered the following commands in Terminal. The commands are:

wget https://raw.githubusercontent.com/frappe/bench/master/install_scripts/setup_frappe.sh

then

sudo bash setup_frappe.sh --setup-production

Unfortunately, I am getting some error like:
Installing for Ubuntu trusty amd64
In case you encounter an error, you can post on https://discuss.frappe.io

Adding ubuntu mariadb repo
Reading package lists…
Building dependency tree…
The following extra packages will be installed:
** gir1.2-glib-2.0 iso-codes libcurl3-gnutls libdbus-glib-1-2**
** libgirepository-1.0-1 librtmp0 python-apt python-apt-common python-pycurl**
** python3-apt python3-dbus python3-gi python3-pycurl**
** python3-software-properties unattended-upgrades**
Suggested packages:
** isoquery python-apt-dbg python-gtk2 python-vte python-apt-doc**
** libcurl4-gnutls-dev python-pycurl-dbg python3-apt-dbg python-dbus-doc**
** python3-dbus-dbg python3-pycurl-dbg**
The following NEW packages will be installed:
** gir1.2-glib-2.0 iso-codes libcurl3-gnutls libdbus-glib-1-2**
** libgirepository-1.0-1 librtmp0 python-apt python-apt-common python-pycurl**
** python-software-properties python3-apt python3-dbus python3-gi**
** python3-pycurl python3-software-properties software-properties-common**
** unattended-upgrades**
0 upgraded, 17 newly installed, 0 to remove and 172 not upgraded.
Need to get 3280 kB of archives.
After this operation, 21.2 MB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
** librtmp0 libcurl3-gnutls libdbus-glib-1-2 libgirepository-1.0-1**
** gir1.2-glib-2.0 iso-codes python-apt-common python3-apt python3-dbus**
** python3-gi python-apt python-pycurl unattended-upgrades**
** python-software-properties python3-pycurl python3-software-properties**
** software-properties-common**
E: There are problems and -y was used without --force-yes

I can’t understand the problem. Please help me to overcome this issue. Thanks in advance.

Update
I’ve installed the package with authentication problem. It was really a painful process. No when I’m giving the sudo bash setup_frappe.sh --setup-production command. It is giving me the following error:

Traceback (most recent call last):
  File "/usr/local/bin/bench", line 9, in <module>
    load_entry_point('bench==3.0.0', 'console_scripts', 'bench')()
  File "/home/frappe/bench-repo/bench/cli.py", line 40, in cli
    bench_command()
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/home/frappe/bench-repo/bench/commands/make.py", line 17, in init
    no_auto_update=no_auto_update, frappe_path=frappe_path, frappe_branch=frappe_branch, verbose=verbose)
  File "/home/frappe/bench-repo/bench/utils.py", line 70, in init
    setup_socketio(bench_path=path)
  File "/home/frappe/bench-repo/bench/utils.py", line 110, in setup_socketio
    exec_cmd("npm install socket.io redis express superagent cookie", cwd=bench_path)
  File "/home/frappe/bench-repo/bench/utils.py", line 100, in exec_cmd
    raise CommandFailedError(cmd)
bench.utils.CommandFailedError: npm install socket.io redis express superagent cookie

I found another setup error related post right now live in this forum. Are they related somehow? Please guys help us,

Maybe I need to narrow down the problem. Some packages can’t be authenticated!!! How can I authenticate these packages?!!! I’ve faced same problem, when I tried to install it on a local server. Am I missing anything?

Please help me guys :slight_smile:

Have you tried solutions from this thread?

Thanks @strixaluco, for your reply. It is really helpful.

I’ve purged and reinstalled nodejs again. Then I run

sudo bash setup_frappe.sh --setup-production

Now I’ve faced a new error :frowning:. It’s showing

fatal: destination path 'bench-repo' already exists and is not an empty directory.

What happened here? Please help. :slight_smile:

Just remove bench-repo directory.

Thanks for your advice. I’ve got a new error now :frowning:

Already using interpreter /usr/bin/python INFO:bench.app:getting app frappe Cloning into 'frappe'... INFO:bench.app:installing frappe /home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#snimissingwarning. SNIMissingWarning /home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning. InsecurePlatformWarning INFO:urllib3.connectionpool:Starting new HTTPS connection (1): raw.githubusercontent.com DEBUG:urllib3.connectionpool:Setting read timeout to None DEBUG:urllib3.connectionpool:"GET /frappe/bench/master/install_scripts/erpnext-apps-master.json HTTP/1.1" 200 101 INFO:bench.app:getting app erpnext Cloning into 'erpnext'... INFO:bench.app:installing erpnext /home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#snimissingwarning. SNIMissingWarning /home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning. InsecurePlatformWarning /bin/sh: 1: npm: not found installing frappe installing erpnext Traceback (most recent call last): File "/usr/local/bin/bench", line 9, in <module> load_entry_point('bench==3.0.0', 'console_scripts', 'bench')() File "/home/frappe/bench-repo/bench/cli.py", line 40, in cli bench_command() File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 716, in __call__ return self.main(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 696, in main rv = self.invoke(ctx) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1060, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 889, in invoke return ctx.invoke(self.callback, **ctx.params) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 534, in invoke return callback(*args, **kwargs) File "/home/frappe/bench-repo/bench/commands/make.py", line 17, in init no_auto_update=no_auto_update, frappe_path=frappe_path, frappe_branch=frappe_branch, verbose=verbose) File "/home/frappe/bench-repo/bench/utils.py", line 70, in init setup_socketio(bench_path=path) File "/home/frappe/bench-repo/bench/utils.py", line 110, in setup_socketio exec_cmd("npm install socket.io redis express superagent cookie", cwd=bench_path) File "/home/frappe/bench-repo/bench/utils.py", line 100, in exec_cmd raise CommandFailedError(cmd) bench.utils.CommandFailedError: npm install socket.io redis express superagent cookie

I can’t understand in which point Ive made the mistake. I’m sure ERPNext installation isn’t this much hassle. What do you suggest, should I rebuild the VPS and try all over again?

Reinstalling the system from scratch won’t necessarily fix your issues while definitely won’t enrich your experience and understanding of the system itself. You should consider this as a last resort.
Instead of reinstalling, you better just read the logs attentively and use Internet search — there is a very big chance that some people faced the same problem before you and came to solution afterwards. The information is out there, you just have to find it.

Back to the topic: please refer to the article from the urllib3 user guide.

Thanks @strixaluco, for your advise. You are correct. Actually I didn’t have any previous with Python at all, that’ why it’s much more harder for me to understand all these things in short time.

Whatever I’ll try my best. Please wish me luck. :slight_smile:

Of course I wish! You’re welcome.
To be perfectly correct, you don’t have to know the Python in this case, because the log contained explicit references to solution:

You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#snimissingwarning.

@strixaluco, I’ve installed the Python3 syccessfully. But when I’m checking the edition using

python -V

It is saying my python version is 2.7.6. I don’t know what is going on???

@fahim

You can just use the Beta installer, it works really well. We plan to deprecate the old installer soon.

Create a new Droplet (Ubuntu 16.04 is also supported), login to it and just run the commands (as root) :

wget https://raw.githubusercontent.com/frappe/bench/develop/playbooks/install.py
sudo python install.py --production --user frappe

You might need to install python beforehand, for that just do:

sudo apt-get install python-minimal

1 Like

Thanks a lot @vjFaLk. I’ll try it immediately. Also thanks for your quick reply.

@vjFaLk Thanks a lot brother/sister. Thanks a lot actually.:smiley: It is showing ERPNext successfully installed, along with Bench. But how can I use the ERPNext now from that VPS. Please help me a bit more, as you know I’m really new with this software.

To understand better about the installation condition,I’m attaching a screen shot.

The VPS you have will have a IP address. Just open that in your browser.

If you want to update the system, you login to the system, then do:

su frappe Because we’ve installed everything on this user
cd ~/frappe-bench
bench update

I’ve already entered the IP address in my browser. It’s showing me Apache2 Ubuntu Default page nothing else!!!

…Apache2? Seems your VPS came with some extra things.

We use nginx. Maybe just this might work:

sudo service apache2 stop
sudo service nginx start

Thanks for the reply. But now when I access the IP from my browser it says “This site can’t be reached”!!! :frowning:

Did those commands run properly? It seems they didn’t. Can you tell me what you get when you run sudo service nginx start?

Actually, I got nothing when I gave the command. Screen shot attached.

That’s actually good. Alright try this :

Do:

su frappe
cd ~/frappe-bench
bench setup nginx
bench restart
Go back to root user
sudo service nginx restart

1 Like