Install frappe on Debian base (ubuntu)

Debian / Ubuntu

install python3.10

install supervisor :
apt-get install supervisor
systemctl enable supervisor
systemctl start supervisor
sudo systemctl restart supervisor

Install git, python, and redis

sudo apt install git python-dev python-pip redis-server
# use below commadn on ubunntu 20
sudo apt install git python-dev python3-pip redis-server

Install MariaDB

sudo apt install software-properties-common

If you are on Ubuntu version older than 20.04, run this before installing MariaDB:

sudo apt-key adv --recv-keys --keyserver hkp:// 0xF1656F24C74CD1D8
sudo add-apt-repository 'deb [arch=amd64,i386,ppc64el] xenial main'

If you are on version Ubuntu 20.04, then MariaDB is available in default repo and you can directly run the below commands to install it:

sudo apt-get update
sudo apt-get install mariadb-server

During this installation you’ll be prompted to set the MySQL root password. If you are not prompted, you’ll have to initialize the MySQL server setup yourself. You can do that by running the command:


Remember: only run it if you’re not prompted the password during setup.

It is really important that you remember this password, since it’ll be useful later on. You’ll also need the MySQL database development files.

apt-get install mariadb-client-10.3

Now, edit the MariaDB configuration file.

nano /etc/mysql/my.cnf

And add this configuration

character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci

default-character-set = utf8mb4

Now, just restart the mysql service and you are good to go.

service mysql restart

Install Node

We recommend installing node using nvm

curl -o- | bash

After nvm is installed, you may have to close your terminal and open another one. Now run the following command to install node.

nvm install 14

Verify the installation, by running:

node -v
# output

Finally, install yarn using npm

npm install -g yarn

Install wkhtmltopdf

apt-get install xvfb libfontconfig wkhtmltopdf

Install Bench CLI

Install bench via pip3

pip3 install frappe-bench

Confirm the bench installation by checking version

bench --version

# output

Create your first bench folder.

cd ~
bench init frappe-bench

After the frappe-bench folder is created, change your directory to it and run this command

bench start

Congratulations, you have installed bench on to your system.

Leave a Reply

Your email address will not be published. Required fields are marked *