Hello Frappe Family …
In this post, we will take a step-by-step approach to install ERPNext v14 in Ubuntu v22.04 OS without any problems and with providing the solutions to any problem you faced.
I decided to share the method with you, for two reasons, first to be as generous as the Frappe team and share the knowledge we have, and also because of noticing that recently several posts have been published for the same problems.
Installation Prerequisites:
These are the minimum prerequisites to get an optimal functionality of ERPNext on your server.
Software Requirements:
Updated Ubuntu 22.04
A user with sudo privileges
Python 3.10+
Node.js 16
Hardware Requirements:
4GB RAM
40GB Hard Disk
Common Errors:
1- error: <class ‘PermissionError’>, [Errno 13] Permission denied: file: /usr/lib/python3/dist-packages/supervisor/xmlrpc.py line: 560
2- INFO: App moved from apps/hrms to archived/apps/hrms-2022-09-08
Getting hrms
Please update your node version to 14 yarn run v1.22.19
Let’s Go …
1-sudo apt-get update -y && sudo apt-get upgrade -y
2- sudo adduser frappe
3- usermod -aG sudo frappe
4- su frappe
5- cd /home/frappe
6- sudo apt-get install git
7- sudo apt-get install python3-dev python3.10-dev python3-setuptools python3-pip python3-distutils
8- sudo apt-get install python3.10-venv
9- sudo apt-get install software-properties-common
10- sudo apt install mariadb-server mariadb-client
11- sudo apt-get install redis-server
12- sudo apt-get install xvfb libfontconfig wkhtmltopdf
13- sudo apt-get install libmysqlclient-dev
14- sudo mysql_secure_installation
Enter current password for root: (Enter your SSH root user password)
-Switch to unix_socket authentication [Y/n]: Y
-Change the root password? [Y/n]: Y
It will ask you to set new MySQL root password at this step. This can be different from the SSH root user password.-Remove anonymous users? [Y/n] Y
-Disallow root login remotely? [Y/n]: N
This is set as N because we might want to access the database from a remote server for using business analytics software like Metabase / PowerBI / Tableau, etc.-Remove test database and access to it? [Y/n]: Y
-Reload privilege tables now? [Y/n]: Y
15- sudo nano /etc/mysql/my.cnf
Add the below code block at the bottom of the file:
[mysqld]
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci[mysql]
default-character-set = utf8mb4
16- sudo service mysql restart
17- sudo apt install curl
18- curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
19- source ~/.profile
20- nvm install 16.15.0
21- sudo apt-get install npm
22- sudo npm install -g yarn
23- sudo pip3 install frappe-bench
24- bench init --frappe-branch version-14 frappe-bench
25- cd frappe-bench
26- chmod -R o+rx /home/frappe
27- bench new-site site1.local
28- bench get-app payments
29- bench get-app --branch version-14 erpnext
30- bench get-app hrms
31- bench --site site1.local install-app erpnext
32- bench --site site1.local install-app hrms
(If you faced error in HRMS installation)
32.1- sudo npm cache clean -f
32.2- sudo npm install -g n
32.3- sudo n stable
32.4- sudo n latest
(If you faced error permission 560)
Go to:
sudo nano /etc/supervisor/supervisord.conf
(Add these lines under [unix_http_server])
chmod=0760
chown=frappe:frappe
and repeat the 26 line:
26- chmod -R o+rx /home/frappe
33- bench start
34- bench --site site1.local enable-scheduler
35- bench --site site1.local set-maintenance-mode off
Here the system will be installed successfully but in developer mode, to convert it to Production complete the following steps:
“Switch to Production”
36- sudo bench setup production frappe
37- bench setup nginx
38- sudo supervisorctl restart all
39- sudo bench setup production frappe
And here we will be able to installed ERPNext with HRMS without any errors, if all the previous steps are applied without skipping any step.