Hey everyone! I decided to create a tutorial for installation, Based on This tutorial but adjust it for Debian 11 (Bullseye) based machines.
Install debian 11 (Bullseye) using net installer (or with the non-free firmware)
during installation create a root password, and a {frappe-user}
with a password. During installtion uncheck a desktop environment (and GNOME Desktop environment) and check SSH server.
After installation is when the magic happens:
- Install sudo app:
apt install sudo
- Add your frappe user to the sudo group:
usermod -aG sudo {frappe-user}
- Allow login remotly using ssh:
nano /etc/ssh/sshd_config
Here you will change:
#PermitRootLogin prohibit-password
to
PermitRootLogin yes
and restart your SSH server: service ssh restart
.
- Now, login to your server remotely using ssh (or putty or whatever). Login as root.
- Switch to you frappe user and to its home directory:
su {frappe-user}
cd ~
- Make sure you have git and curl installed for downloading all required additional resources:
sudo apt install git curl -y
- Work in your /tmp folder so unnecessary resources will be deleted at reboot:
cd /tmp
- Add mariadb 10.6 repository for debian:
curl -LsS -O https://downloads.mariadb.com/MariaDB/mariadb_repo_setup
sudo bash mariadb_repo_setup --mariadb-server-version=10.6
sudo apt update
- Install and update anaconda and prepare and activate a python 3.10 environment:
curl --output anaconda.sh https://repo.anaconda.com/archive/Anaconda3-2022.05-Linux-x86_64.sh
bash anaconda.sh
cd ~
source .bashrc
conda update conda
conda create -n myenv python=3.10 anaconda
conda activate myenv
- Install additional mariadb, redis server and other resources required for frappe:
sudo apt install software-properties-common redis-server mariadb-server mariadb-client wkhtmltopdf
you may also want to include the following (recommended):
sudo apt install xvfb libfontconfig
- Configure mariadb:
sudo mysql_secure_installation
Enter current password for root: (hit Enter)
Switch to unix_socket authentication [Y/n]: Y
Change the root password? [Y/n]: Y
It will ask you to set new mariadb 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
Remove test database and access to it? [Y/n]: Y
Reload privilege tables now? [Y/n]: Y
and
sudo nano /etc/mysql/my.cnf
Add
[mysqld]
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci[mysql]
default-character-set = utf8mb4
at the end of the file
- then restart your mariadb server:
sudo service mysql restart
- Now as on frappe installation instructions, install Node:
curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
source ~/.profile
nvm install 16.15.0
sudo apt install npm
sudo npm install -g yarn
then reactivate python 3.10 environment:
conda activate myenv
and continue like in the installation instructions:
pip3 install frappe-bench
bench init --frappe-branch version-14 frappe-bench
Now create your site and make it your default:
cd frappe-bench/
bench new-site {site name} # follow on screen instructions (don't forget your **mariadb root password** (see above)
bench use {site name}
- Now create you apps and install them, or get payments and ERPNext apps etc. and install them:
bench new-app {app name} # follow on screen instructions
bench --site {site name} install-app {app name}
bench get-app payments # optional, required only if you wish to install ERPNext
bench get-app --branch version-14 erpnext # optional
bench --site {site name} install-app erpnext # optional
- Finally start your “bench” and begin working with your installed apps
bench start
Just remember that you are currently in developer mode (you can probably access your installed apps through: http://[your server ip address]:8000)
Good luck!