This installation uses the stable version of frappe framework(14.1.0) and erpnext runtime(14.0.0).
You can skip steps 1 and 2 if you're installing ERPNext directly to your host machine.
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.
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: 120 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:
sudo su
apt-get install libffi-dev python3-pip python3-dev python3-testresources libssl-dev wkhtmltopdf gcc g++ make redis python3.10-venv -y
apt-get install mariadb-server mariadb-client -y
The command above will install both server and client automatically.
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
apt-get install libmysqlclient-dev
Login to MariaDB console:
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 |
MariaDB [mysql] > flush privileges;
MariaDB [mysql] > exit;
Edit the file:
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:
systemctl restart mariadb
Create a new user named erpnext
:
useradd -m -s /bin/bash erpnext
Set password for erpnext
user:
passwd erpnext
Add erpnext
user to sudo group
so that it can execute sudo
command:
usermod -aG sudo erpnext
Login the erpnext
user and set up the environment variables:
su - erpnext
sudo nano ~/.bashrc
Add the following line:
PATH=$PATH:~/.local/bin/
Save and close the file, then activate the environment variable:
source ~/.bashrc
sudo apt install curl
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.39.1/install.sh | bash
source ~/.bashrc
nvm install 16
erpnext$:npm install -g yarn
Login erpnext
user
su - erpnext
Create a new directory for bench
.
sudo mkdir /opt/bench
Grant permission to erpnext user
:
sudo chown -R erpnext:erpnext /opt/bench
Change directory to your newly created folder. Clone bench.
cd /opt/bench
git clone https://github.com/frappe/bench bench-repo
Install bench.
pip3 install -e bench-repo
Initialize frappe.
bench init erpnext --frappe-branch version-14
Change directory to the newly created folder. Create new site for your desired domain.
cd erpnext
bench new-site YOUR_SITE
Get the ERPNext app with version 14.
bench get-app --branch version-14 erpnext
If you encounter an error regarding payments app, get payments app and install
bench get-app payments
bench --site YOUR_SITE install-app payments
Install erpnext app in your site.
bench --site YOUR_SITE install-app erpnext
Install supervisor
, nginx
and nodejs
.
sudo apt-get install supervisor nginx nodejs
Install frappe-bench
from pip
.
sudo pip3 install frappe-bench
Setup for production environment. Run this twice.
sudo ~/.local/bin/bench setup production erpnext
Note: If you encountered an error with nginx
because it is not running yet, simply start it by executing the command below:
sudo systemctl start nginx
Done.
Check supervisor
status to verify that frappe/erpnext
services are running.
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