Not working. I use the same process but on servers other than GCP. I spin-up Ubuntu 20.04 servers and run the same script and it always fails with:
File “/usr/lib/python3.8/subprocess.py”, line 364, 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=erpnxtadmin’]’ returned non-zero exit status 2.
Doing it on GCP wouldn’t make any difference. I am already using Ubuntu servers on at least 3 other service providers and all fail with the same error.
New user here, I’ve been trying to install ERPNext on my fresh new VPS (2GB ram) and have yet to succeed. I first tried on ubuntu 20, then centOS 7 and 8, now I’m trying with ubuntu 18. Tried manual before, and docker install now. Nothing works
I’ll try the completely manual guide again tomorrow. If it doesn’t work I think I’ll be forced to switch to another software for a while.
I use hitchhiker, but it has some dated commands.
It is good that when asking assistance on the forum, the community knows the sequence of what you did. In my experience, you get faster and more accurate assistance.
**EDIT - 05/21/2021 This has been updated today to compensate for Ubuntu 20.04 server images that are more stripped down and missing packages. Particularly ‘curl’ and ‘git’ needed to be installed during the process to get everything working. Also there was a missing step of adding some important stuff into the $PATH. ~BKM
I have not published it yet, but I have worked out a revision of the 22 step guide that has been working for the past 2 days (I added 2 additional steps to get to 24). It was originally put out by @adals back in January while v13 was still in beta. I have modified it for my purposes and had some success. Here it is in it’s raw form. There are none of my normal explanations of each step, etc. that I would normally do. So take it for what it is. Just follow the steps and don;t ask why. You should wind up with a working system on Ubuntu 20.04 (if your VPS has an up-to-date image). Just remember… anywhere you see [USER] use your own server username. If you follow the instructions exactly you end up with a server nearly identical to the one the easy install would make.
choose any cloud you trust
enter to your system via ssh with root user
apt update && apt upgrade -y && shutdown -r now
log back in as root and continue (the shutdown command forces the server to restart if not then reboot it manually) then type: (Watch carefully that this command completes properly. I have recently encountered a Ubuntu 20.04 image that did not include the curl or git commands and it had to be installed. It is simple enough to do and if it is missing, the command line response will tell you to install it and even gives you the syntax to use. Then you can continue with the command again)
nano /etc/mysql/my.cnf
when the editor opens, scroll to the bottom of the file and add these lines:
[mysqld]
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
[mysql]
default-character-set = utf8mb4
service mysql restart
mysql_secure_installation
press enter for password then answer the questions as follows:
Set root password? [Y/n] y
Remove anonymous users? [Y/n] y
Disallow root login remotely? [Y/n] n
Remove test database and access to it? [Y/n] y
Reload privilege tables now? [Y/n] y
mysql -u root -p
Immediately after the -p type the password you assigned to mariadb in the last step. Remember there is to be NO space between the -p and the first character of the password. Then at the database prompt type the following commands (case sensitive & press enter after each line)
USE mysql;
UPDATE user SET plugin=' ' WHERE user = 'root';
FLUSH PRIVILEGES;
exit
close the terminal (logout of root) and open new one and login with ssh [USER]
bench new-site site1.local
(Now that we are up to v13.3.x expect a lot of deprication warnings with this step)
bench get-app --branch version-13 erpnext
bench --site site1.local install-app erpnext
sudo bench setup production [USER]
bench --site site1.local enable-scheduler
Now reboot the server. Once it has rebooted you should be able to open a web browser and type in the ip address of your server to get the ERPNext login screen. Login as administrator and go through the setup wizard before attempting to do any further work on the server. Once that is done you can find plenty of sources on the forum to help you with things like setting the URL (using the bench add-domain command) and setting up the SSL certificates.
Hope this helps… and no I am not taking time to explain everything right now. That may be in a future tutorial.
This does NOT solve the problem of the easy install method failing. That STILL needs to be FIXED!!
Update: thanks, following your whole updated guide worked, Ubuntu 20.10 ! It already had curl installed. Only correction on your guide is on step 10 the command should be
mysql_secure_installation
instead of run mysql_secure_installation.
I’ll try to configure it on my domain now, and I’ll update if successful.
Ahh… you are correct. (fixed it in the post above so others do not trip over it)
When I copied it from my document on my desktop PC I forgot to eliminate the word run which was both a note to myself and is was actually part of the original notes from @adals when it was first created back in January. I knew what it meant but I didn’t structure it for a layman to understand. That was my fault. But it was just my raw dump.
This would be a linux user (other than the ROOT user).
The “site1.local” site is the site name that is created when you use the “Easy Install” method from the frappe/bench github repo. It is used here to make the manual method of installing the system look and feel just like the resulting installation if the Easy Install script were used.
The easy install script creates the “site1.local” site during the install process and then there are ways to change that name built into the system.
At this point I think you need to do a lot more reading in the forum to understand how the install process works. Here is an article I wrote several years ago that describes the entire process. It was written for version 10 of ERPNext but the concepts are still the same even if the steps may not work the same any longer. Please read this for a better understanding of how it all ties together.
Yup! I ran into that myself this morning on a new VPS service provider. It turns out this provider has a very stripped down version of the Ubuntu 20.04 image in their catalog and when I spin it up it is missing two important packages: git and curl
First of all answer Y to rollback the changes, then to get past this particular error you need to run:
apt-get install git
After this is done the “bench init --frappe-branch version-13 frappe-bench” command will work properly. I will update the posting above later today to show this. I want to get some more testing done over the next few hours before I commit it to the list though.
Do not let my delay in updating the steps get in the way of you using the fix I described here. It will solve your problem.
BKM
**EDIT - Updated the procedure above to reflect this change as well as a few others to improve the reliability of a successful install. - BKM
Rename folder site1.local at /home/frappe/frappe-bench/sites to whatever domain name will be used
Replace site1.local at currentsite.txt
Replace site1.local at nginx.conf at cd /home/frappe/frappe-bench/config
Add hostname at /etc/hostname
Add hostname at /etc/hosts
Add hostname at cd /home/frappe/frappe-bench/sites/[site name]/site_config.json
Should look like this:
{
"db_name": "[site name]",
"db_password": "*********",
"host_name": "[domain name]"
}
sudo apt-get install certbot
sudo systemctl stop nginx
sudo certbot --standalone --agree-tos --domain [domain name] -n -m [your email] certonly
sudo systemctl start nginx
If missing, add the following to cd /home/frappe/frappe-bench/sites/[site name]/site_config.json
{
"ssl_certificate": "/etc/letsencrypt/live/[domain name]/fullchain.pem",
"ssl_certificate_key": "/etc/letsencrypt/live/[domain name]/privkey.pem"
}
cd /home/frappe/frappe-bench
bench setup nginx
sudo service nginx reload
sudo service nginx restart