Installing ERPNext on a fresh Ubuntu 19.10 server

Guys,

Good day. Im installing ERPNext on a new server but a got these messages, Im not sure if these are error messages or not. Im following this guide— GitHub - frappe/bench: CLI to manage Multi-tenant deployments for Frappe apps

when I entered this command “python3 install.py --production”
i got these messages …

start message========

Logs are saved under /tmp/logs/easy-install__2020-03-05__10-27.log
Checking System Compatibility…
ubuntu 19 is compatible!
curl already installed!
wget already installed!
git already installed!
pip3 already installed!
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost
does not match ‘all’
Input MySQL and Frappe Administrator passwords:
Passwords saved at ~/passwords.txt
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost
does not match ‘all’
[WARNING]: Could not find aptitude. Using apt-get instead
Traceback (most recent call last):
File “install.py”, line 437, in
install_bench(args)
File “install.py”, line 241, in install_bench
run_playbook(‘site.yml’, sudo=True, extra_vars=extra_vars)
File “install.py”, line 362, in run_playbook
success = subprocess.check_call(args, cwd=os.path.join(cwd, ‘playbooks’), stdout=log_stream, stderr=sys.stderr)
File “/usr/lib/python3.7/subprocess.py”, line 363, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘[‘ansible-playbook’, ‘-c’, ‘local’, ‘site.yml’, ‘-vvvv’, ‘-e’, ‘@/tmp/extra_vars.json’, ‘–become’, ‘–become-user=frappe’]’ returned non-zero exit status 2.

end message ====

I’m not sure if this is an error message or not and how will I proceed. Thanks so much.
Hope to here from you soon.

Mandy

did you use Manual Installation or Easy Script , i guess u use Easy Script Right !

hi, yes i used easy script…

how do i proceed then with this issue, any idea?

thanks,
Mandy

Please use this link to install

Thank you very much i will try this guide and let you know.

  • If u Install on Linux , Please re Install your Operating System.
    Then use those Commands Carefully.
  • here i used Ubuntu OS v 18.4.

1- sudo apt-get update && sudo apt-get upgrade -y
2- sudo apt-get install python3-setuptools python3-minimal redis-server build-essential -y
3- sudo wget https://raw.githubusercontent.com/frappe/bench/master/playbooks/install.py
4-sudo -H python3 install.py --production

  • Finally you will get Message " Bench + Frappe + ERPNext has been successfully installed ! " .
1 Like

yeah im doing that. i reinstall the OS and redo the erp installation. I will try this as well and let you know.

Thanks guys for helping much appreciated.

God bless.

Mandy

Easy install is not yet 100% ready for Ubuntu 19.
For Ubuntu 18, easy install is a breeze.

hi,

I followed your steps and still im getting this messages. Steps 1-3 went very well except the last command which gives this messages–

mandy@erp-server:~$ sudo -H python3 install.py --production

Logs are saved under /tmp/logs/easy-install__2020-03-05__14-47.log
Checking System Compatibility…
ubuntu 19 is compatible!
curl already installed!
wget already installed!
git already installed!
Installing pip3…
pip3 installed!
launchpadlib 1.10.7 requires testresources, which is not installed.
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost
does not match ‘all’
Input MySQL and Frappe Administrator passwords:
Please enter mysql root password:
Re-enter mysql root password:
Please enter the default Administrator user password:
Re-enter Administrator password:
Passwords saved at ~/passwords.txt
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost
does not match ‘all’
[WARNING]: Could not find aptitude. Using apt-get instead
Traceback (most recent call last):
File “install.py”, line 437, in
install_bench(args)
File “install.py”, line 241, in install_bench
run_playbook(‘site.yml’, sudo=True, extra_vars=extra_vars)
File “install.py”, line 362, in run_playbook
success = subprocess.check_call(args, cwd=os.path.join(cwd, ‘playbooks’), stdout=log_stream, stderr=sys.stderr)
File “/usr/lib/python3.7/subprocess.py”, line 363, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘[‘ansible-playbook’, ‘-c’, ‘local’, ‘site.yml’, ‘-vvvv’, ‘-e’, ‘@/tmp/extra_vars.json’, ‘–become’, ‘–become-user=frappe’]’ returned non-zero exit status 2.

What could possibly wrong with my installation. thank you very much for the assist.

Mandy

I guess I will have to do it on the ubuntu 18 and see.

Thanks for all that gave me ideas. Thanks guys.

I will let you know how it went…

to be continued…

Mandy

keep note of [Joseph_Marie_Alba]

for me, I just with straight to

  1. sudo wget https://raw.githubusercontent.com/frappe/bench/master/playbooks/install.py
  2. sudo python3 install.py --develop --user myfrappeuser --mysql-root-password mysqlpassword --mariadb-version 10.3 --admin-password myadminpassword --verbose
  3. sudo usermod -aG sudo myfrappeuser
  4. sudo passwd myfrappeuser
    → enter password for myfrappeuser

next time you login to ubuntu, use the myfrappeuser (or the user name you used) and password to login.
your ubuntu home directory will be ~/myfrappeuser

Change these:

  1. myfrappeuser - this will be your login name (the reason why it is good to do this is that the frappe user may be a security risk because this could become a very common user name)

  2. –develop - you may change this to --production if you like to go straight to production mode. (you may switch between production and develop by issuing bench commands.)

  3. myadminpassword - you may change this to the password you like for the Administrator user (when you login the frappe/erpnext website).

  4. mysqlpassword - you may cange this to the root password you like for mariadb database

(I do sudo apt update and upgrade only after I had installed frappe/erpnext)

Better yet you can try the manual installation if the easy installation doesn’t work out well for you.

I don’t recommend doing manual setup. Easy install is much safer (although it might break sometimes).

i was also struck on the same thing a few days back , the trick is simple , remove maria db and mysql packages which comes prebuilt with the Ubuntu server , do a fresh setup using easy install and you are good to go !

Why are you doing the script to install? Most of the tutorials are pretty straight forward … if you’re using easy install script, you’re better off paying for a service to install … otherwise your web server alone is not going to be hardened for security …

From the frappe manual:

These steps assume you want to install Bench in developer mode. If you want install in production mode, follow the Easy Install method.

If you need security, it is better to go with Easy install

So the easy install is geared towards security ?

It is better to use Easy install. Easy install seems to imply beginner mode. It is not. It means ERPNext team gave us a single line installation, but the ansible that are activated includes all the goodies.

When I began ERPNext I also followed the manual installation found in the manual and other sources. But I looked into the code of the install.py and ansible playbooks and realized that using Easy install does it all in the updated way. (Yes Easy Install is updated by the ERPNext team). For example, manual steps imply that you need to install python 2.7. But for Ubuntu 18, you can actually use python3 (python 3.6 already built in Ubuntu 18) for the install.py. There are many goodies inside Easy install that manual steps miss.

You can do manual security steps like ssl, mariadb encryption, redis configuration, and nginx optimization after Easy install.

Unfortunately, the instructions found for Easy Install is incomplete. I issue the following command:

sudo python3 install.py --production --user frappe --mysql-root-password rootpass --mariadb-version 10.3 --admin-password adminpass --verbose

or

sudo python3 install.py --develop --user frappe --mysql-root-password rootpass --mariadb-version 10.3 --admin-password adminpass --verbose

(Then, I go for coffee. No need to wait to enter admin password and mariadb password)

after that, I made user frappe into an ubuntu sudo user, give it a password, and

sudo usermod -aG sudo frappe
sudo passwd frappe
→ provide frappe password for unix
su - frappe (to make frappe the active sudo user)
cd frappe-bench

you may issue bench commands at this point.

If you used --production option, you can access ERPNext at your browser.
If you used --develop option, you need to issue bench start command at frappe-bench directory and access ERPNext at the browser using the 8000 port (e.g. localhost:8000).

Next time you login to Ubuntu, you can login using frappe user and password.

Security concern: frappe is a known user name. You may change frappe to a username you like:

sudo python3 install.py --production --user myuser --mysql-root-password rootpass --mariadb-version 10.3 --admin-password adminpass --verbose

1 Like

Additional Info:

You don’t need to make the ubuntu user frappe (or the frappe user name you choose). Easy Install will make this ubuntu user and its home directory where frappe-bench, python env, apps, and sites will be placed.