This installation uses the stable version of frappe framework(13.31.0) and erpnext(13.32.0).
Note: Deploying the ERP System inside a virtual machine is the simplest and easiest procedure. Through the use of snapshots and clone, it is easier to backup and restore the ERP system image compared to containerized docker solution or a direct installation to the host operating system.
Install VirtualBox.
Create a new virtual machine
Type: Linux, Version: Ubuntu Server(64-bit) Note: Tested on 22.04 LTS
Memory size: 4096 MB
File size: 60 GB
Hard disk file type: VDI
Storage on physical hard disk: Dynamically allocated
Processor count: 2, Enable PAE/NX
Video Memory: 8MB
Graphics Controller: VBoxVGA
Your name: Administrator
Computer name: ubuntu
username: administrator
password: YOUR_PASSWORD
Wait for the setup to finish. Reboot.
Launch Terminal then run the following commands:
administrator$:sudo su
root#:apt-get install libffi-dev python3-pip python3-dev python3-testresources libssl-dev wkhtmltopdf gcc g++ make redis -y
root#:apt-get install mariadb-server mariadb-client -y
The command above will install both server and client automatically.
root#:mysql_secure_installation
The above command will prompt for the following options:
Enter current password for root (enter for none): (Enter)
Switch to unix_socket authentication
: n
Change the root
password?: y
New password: YOUR_PASSWORD
Remove anonymous user?: y
Disallow root login remotely: y
Remove test database and access to it?: y
Reload privilege tables now? y
root#:apt-get install libmysqlclient-dev
Login to MariaDB console:
root#:mysql -u root -p
Verify MariaDB authentication plugin:
MariaDB > use mysql;
MariaDB [mysql]> select User, plugin from user;
The result should be similar to this:
User | plugin |
---|---|
root | mysql_native_password |
Edit the file:
root#:nano /etc/mysql/mariadb.conf.d/50-server.cnf
Add or modify the following lines:
[mysqld]
innodb-file-format=barracuda
innodb-file-per-table=1
innodb-large-prefix=1
character-set-client-handshake=FALSE
character-set-server=utf8mb4
collation-server=utf8mb4_unicode_ci
Save the file, then restart MariaDB service:
root#:systemctl restart mariadb
Create a new user named erpnext
:
root#:useradd -m -s /bin/bash erpnext
Set password for erpnext
user:
root#:passwd erpnext
Add erpnext
user to sudo group
so that it can execute sudo
command:
root#:usermod -aG sudo erpnext
Login the erpnext
user and set up the environment variables:
root#:su - erpnext
erpnext$:sudo nano ~/.bashrc
Add the following line:
PATH=$PATH:~/.local/bin/
Save and close the file, then activate the environment variable:
erpnext$:source ~/.bashrc
erpnext$:sudo apt install curl
erpnext$:curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash -
erpnext$:source ~/.bashrc
erpnext$:nvm install 14
erpnext$:npm install -g yarn
Login erpnext
user
su - erpnext
Create a new directory for bench
.
erpnext$:sudo mkdir /opt/bench
Grant permission to erpnext user
:
erpnext$:sudo chown -R erpnext:erpnext /opt/bench
Change directory to your newly created folder. Clone bench.
erpnext$:cd /opt/bench
erpnext$:git clone https://github.com/frappe/bench bench-repo
Install bench.
erpnext$:pip3 install -e bench-repo
Initialize frappe.
erpnext$:bench init erpnext --frappe-branch version-13
Change directory to the newly created folder. Create new site for your desired domain.
erpnext$:cd erpnext
erpnext$:bench new-site YOUR_SITE
Get the ERPNext app with version 13.
erpnext$:bench get-app --branch version-13 erpnext
Install erpnext app in your site.
erpnext$:bench --site YOUR_SITE install-app erpnext
Install supervisor
, nginx
and nodejs
.
erpnext$:sudo apt-get install supervisor nginx nodejs
Install frappe-bench
from pip
.
erpnext$:sudo pip3 install frappe-bench
Setup for production environment. Run this twice.
erpnext$:sudo ~/.local/bin/bench setup production erpnext
Done.
Check supervisor
status to verify that frappe/erpnext
services are running.
erpnext$:sudo supervisorctl status
erpnext-redis:erpnext-redis-cache RUNNING
erpnext-redis:erpnext-redis-queue RUNNING
erpnext-redis:erpnext-redis-socketio RUNNING
erpnext-web:erpnext-frappe-web RUNNING
erpnext-web:erpnext-node-socketio RUNNING
erpnext-workers:erpnext-frappe-default-worker-0 RUNNING
erpnext-workers:erpnext-frappe-long-worker-0 RUNNING
erpnext-workers:erpnext-frappe-schedule RUNNING
erpnext-workers:erpnext-frappe-short-worker-0 RUNNING
Create a clone to backup your successful installation snapshot.