De Installation

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 7

Frappe Installation

Table of Contents:
 Step 1: Server Setup
 Step 2: Install Required Packages
 Step 3: Configure MySQL Server
 Step 4: Install CURL, Node, NPM, Yarn
 Step 5: Install Frappe Bench
 Step 6: Install ERPNext and other Apps
 Step 7: Setup Production Server

PRE-REQUISITES:
 Operating System: Linux Ubuntu 22.04 LTS
 Minimum Recommended Hardware: 2 CPU | 2 GB RAM | 10
GB Disk
 Root shell access to the server (via SSH)
1.1 Install GIT
 sudo apt-get install git

Check if GIT is correctly installed by running git --version

1.2 Install Python


 sudo apt-get install python3-dev python3.10-dev python3-setuptools
python3-pip python3-distutils

1.3 Install Python Virtual Environment


 sudo apt-get install python3.10-venv

Check if Python is correctly installed by running command:python3 -V

1.4 Install Software Properties Common (for repository management)


 sudo apt-get install software-properties-common
1.5 Install MariaDB (MySQL server)

 sudo apt install mariadb-server mariadb-client

Check if MariaDB is correctly installed by running command: mariadb --


version

1.6 Install Redis Server


 sudo apt-get install redis-server

1.7 Install other necessary packages (for fonts, PDFs, etc)

 sudo apt-get install xvfb libfontconfig wkhtmltopdf


 sudo apt-get install libmysqlclient-dev

2.CONFIGURE MYSQL SERVER


2.1 Setup the server
 sudo mysql_secure_installation

During the setup process, the server will prompt you with a few questions as
given below. Follow the instructions to continue the setup;

 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

2.2 Edit the MySQL default config file


 sudo vim /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

If you don’t know how to use VIM:

 Once the file is open, hit “i” key to start editing the file.

 After you’re done editing the file hit “Esc + :wq” to save the file

2.3 Restart the MySQL server (for the config to take effect)
 sudo service mysql restart

3. Instal CURL, Node, NPM and Yarn


3.1 Install CURL
 sudo apt install curl

3.2 Install Node


 curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh
| bash

source ~/.profile

nvm install 16.15.0

3.3 Install NPM


 sudo apt-get install npm

3.4 Install Yarn


 sudo npm install -g yarn

Check if Node is correctly installed by running command: node –version


4.INSTALL FRAPPE BENCH
4.1 Install Frappe Bench
 sudo pip3 install frappe-bench

Check if Frappe Bench is correctly installed by running command:bench --


version

4.2 Initialize Frappe Bench


 bench init --frappe-branch version-14 frappe-bench

4.3 Go to Frappe Bench directory


This will be the main directory from where we will be running all the
commands.

 cd frappe-bench/
 bench start
4.4 create a site in frappe bench
Use the bench new-site command to create a new site.

During this process, you'll be prompted to provide the MySQL root


password. If you set one during the MySQL setup, enter that here. If you're
not sure, you can reset or retrieve it, but you'll need it to proceed.

 bench new-site site1.local

Set up administrator details: After creating the site, you'll need to set an
administrator password and email during the setup process.

4.5 Steps to Add site1.local to Hosts File Manually


 bench --site site1.local add-to-hosts

5.1 Install ERPNext latest version in bench & site

 bench get-app erpnext --branch version-14

5.2 Check Frappe and ERPNext Versions


 bench version
This will output something like:

erpnext : 14.74.6 (version-14)


frappe : 14.82.2 (version-14)
Open url http://192.168.65.237:8000 to login
5.3 To install ERPNext on the site site1.local
 bench --site site1.local install-app erpnext
Make sure you are inside the frappe-bench directory when running the
command.
ERPNext and Frappe Versions: Ensure that the versions of ERPNext and
Frappe are compatible.
Correct Site: Confirm that the site site1.local has been created correctly
and added to your hosts file.
Database Setup: Ensure your database and MySQL/MariaDB services are
running properly.
5.4 Migrate the site
 bench - -site site1.local migrate
5.5 Add the Site to the Bench Config
 bench use site1.local
 sudo bench setup production erp-next
 bench restart
5.6 Start the Bench
Now, start the bench to serve our site
 bench start
Open url http://192.168.65.237:8000 to login
The IP 192.168.65.237 is reachable from our machine.
Port 8000 is open on your system.

URL: http://192.168.65.237:8000
User name: Administrator
password: techbulls123

Email address: nagasudha.p@techbulls.co.in


Password: techbbulls123

Home screen of frappe


6.SETUP PRODUCTION SERVER

6.1 Enable scheduler service


bench --site site1.local enable-scheduler
6.2 Disable maintenance mode
bench --site site1.local set-maintenance-mode off
6.3 Setup production config
sudo bench setup production erpnext
6.4 Setup NGINX web server
bench setup nginx
6.5 Final server setup
sudo supervisorctl restart all
sudo bench setup production erpnext

You might also like