How to install ERPNext v15 on Linux Ubuntu (step-by-step instructions)
sudo apt install openssh-server -y
sudo apt-get update -y && sudo apt-get upgrade -y
sudo apt install locate
sudo adduser frappe
sudo usermod -aG sudo frappe
su frappe
cd /home/frappe
***************************************
sudo add-apt-repository ppa:deadsnakes/ppa
# ModuleNotFoundError: No module named 'apt_pkg'
sudo apt install --reinstall python3-apt
***************************************
Setting Time Zone: timedatectl set-timezone "Asia/Kolkata"
Required Packages
Install Git: sudo apt-get install git -y
Install fail2ban :sudo apt install fail2ban -y
Python Librarues: sudo apt-get install python3-dev python3.10-dev python3-setuptools python3-pip python3-distutils -y
: sudo apt install python3.10-venv -y
Install nginx: sudo apt install nginx -y
sudo service nginx status
touch /var/log/nginx/access.log
touch /var/log/nginx/error.log
Install supervisor: sudo apt-get install supervisor -y
: sudo service supervisor status
Common Software Properties: sudo apt-get install software-properties-common -y
Install Maria DB: sudo apt install mariadb-server mariadb-client -y
Redis 6: sudo apt-get install redis-server -y
Install PDF Converter: sudo apt-get install xvfb libfontconfig wkhtmltopdf -y
Server Setup: sudo apt-get install libmysqlclient-dev -y
: sudo mysql_secure_installation
: MySQL root password: <admin123>
: sudo nano /etc/mysql/my.cnf
Code to add to my.cnf:
[mysqld]
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
[mysql]
default-character-set = utf8mb4
restart the server: sudo service mysql restart
Node.js 18: sudo apt install curl
: curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
: source ~/.profile
: nvm install 18
: sudo apt-get install npm -y
yarn 1.12+: sudo npm install -g yarn
Installing Frappe Bench : sudo pip install frappe-bench
Initiating the latest bench: bench init --frappe-branch version-15 frappe-bench
: cd frappe-bench/
: chmod -R o+rx /home/frappe
: bench start
Open Another Terminal and go to frappe-bench directory
su frappe
cd /home/frappe/frappe-bench
Adding a new website: bench new-site demoerpnext.meditechnos.com
MySQL root password: <admin123>
Set Administrator password: <admin123>
Re-enter Administrator password: <admin123>
#sudo ln -s /home/frappe/frappe-bench/config/supervisor.conf /etc/supervisor/conf.d/frappe-bench.conf
sudo nano /etc/supervisor/supervisord.conf
; supervisor config file
[unix_http_server]
file=/var/run/supervisor.sock ; (the path to the socket file)
chmod=0700 ; sockef file mode (default 0700)
chown=frappe:frappe ; chown=your_erp_user:your_erp_user
[group:frappe]
Getting the Apps
ERPNEXT-15 : bench get-app --branch version-15 erpnext
Payments: bench get-app --branch version-15 payments
HRMS: bench get-app --branch version-15 hrms
Healthcare : bench get-app --branch version-15-beta healthcare
Chat App: bench get-app chat
#India Compliance : bench get-app --branch version-15-beta https://github.com/resilient-tech/india-compliance.git
# bench get-app --branch version-15 https://github.com/resilient-tech/india-compliance.git
Go to First Terminal
Stop the running bench : ctrl+c
Set the website: bench use demoerpnext.meditechnos.com
Start the bench again: bench start
Go to second terminal
Install ERPNext-15 : bench --site demoerpnext.meditechnos.com install-app erpnext
Install Payments app : bench --site demoerpnext.meditechnos.com install-app payments
Install HRMS : bench --site demoerpnext.meditechnos.com install-app hrms
Install healthcare : bench --site demoerpnext.meditechnos.com install-app healthcare
# Error: No module named 'frappe.core.doctype.medical_department'
#Install India Compliance: bench --site demoerpnext.meditechnos.com install-app india_compliance
#Uninstall india_compliance App: bench --site demoerpnext.meditechnos.com uninstall-app india_compliance
List of installed app: bench --site demoerpnext.meditechnos.com list-apps
Setup Production mode:
Go to first terminal
Stop the bench: ctrl+c
Enable Scheduler: bench --site demoerpnext.meditechnos.com enable-scheduler
Disable Mnt mode: bench --site demoerpnext.meditechnos.com set-maintenance-mode off
Setup Production: sudo bench setup production frappe
: sudo bench setup role fail2ban
NGINX Setup: bench setup nginx
Restart All Services: sudo supervisorctl restart all
Setup Production once again: sudo bench setup production frappe
Open the ports: sudo ufw allow 22,25,80,143,443,3306, 3022,3389,8000/tcp
Apply Firewall : sudo ufw enable / sudo ufw disable
your server http://[IP-address]:80 and you will have a fresh new installation of ERPNext ready to be configured!
User name: administrator
password: admin123