[Solved] What changed in install.py today?!? Worked this morning, Fails now. (v13.1.1 & v13.2.x)

**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 :sunglasses:

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.

  1. choose any cloud you trust

  2. enter to your system via ssh with root user

  3. apt update && apt upgrade -y && shutdown -r now
    
  4. 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)

    apt-get install curl git
    curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -

  5.  apt install -y nodejs mariadb-server redis-server python3-pip nginx python3-testresources
    
  6.  adduser [USER]
    
  7. usermod  -aG sudo [USER]
    
  8. 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

  9. service mysql restart

  10. 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

  11. 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
  1. close the terminal (logout of root) and open new one and login with ssh [USER]

  2. sudo npm install -g yarn

  3. node -v && npm -v && python3 -V && pip3 -V && yarn -v

  4. pip3 install frappe-bench
    export PATH=$PATH:/home/[user]/.local/bin

  5. sudo pip3 install frappe-bench

  6. bench init --frappe-branch version-13 frappe-bench

  7. cd frappe-bench

  8. bench new-site site1.local
    (Now that we are up to v13.3.x expect a lot of deprication warnings with this step)

  9. bench get-app --branch version-13 erpnext

  10. bench --site site1.local install-app erpnext

  11. sudo bench setup production [USER]

  12. bench --site site1.local enable-scheduler

  13. 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!!

~BKM

17 Likes