Installing Frappe Framework v15 in Ubuntu: Including Production Setup
Guide to Install Frappe v15 in Ubuntu 22.04 LTS
Guide to Install Frappe Framework version 15 in Ubuntu 22.04 LTS
Follow these steps to ensure a successful installation of Frappe Version 15 on your Ubuntu 22.04 LTS system.
1. Prepare System Dependencies:
Install essential software for managing repositories:
sudo apt install software-properties-common
2. Python Installation:
Add the deadsnakes PPA for Python:
sudo add-apt-repository ppa:deadsnakes/ppa -ysudo apt update
Install Python 3.11:
sudo apt install python3.11
Check if it is installed properly
python3.11 --version
Get the full Python 3.11 package:
sudo apt install python3.11-full
Install additional development tools:
sudo apt-get install python3-dev python3-setuptools python3-pip python3.11-venv
3. Database Setup (MariaDB):
Install MariaDB server:
sudo apt install mariadb-server
Secure your MariaDB installation:
sudo mysql_secure_installation
Install necessary MySQL database development files:
sudo apt-get install libmysqlclient-dev
Configure MariaDB settings:
sudo nano /etc/mysql/mariadb.conf.d/50-server.cnf
use this in the 50-server.cnf file
[server]user = mysqlpid-file = /run/mysqld/mysqld.pidsocket = /run/mysqld/mysqld.sockbasedir = /usrdatadir = /var/lib/mysqltmpdir = /tmplc-messages-dir = /usr/share/mysqlbind-address = 127.0.0.1query_cache_size = 16Mlog_error = /var/log/mysql/error.log[mysqld]innodb-file-format=barracudainnodb-file-per-table=1innodb-large-prefix=1character-set-client-handshake = FALSEcharacter-set-server = utf8mb4collation-server = utf8mb4_unicode_ci[mysql]default-character-set = utf8mb4
Restart MariaDB:
sudo service mysql restart
4. Redis Installation:
Install Redis server:
sudo apt-get install redis-server
5. Node.js and Yarn Setup:
Install Node Version Manager (nvm):
sudo apt install curlcurl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bashsource ~/.profile
Install Node.js 18.X
nvm install 18
Install Yarn:
sudo apt-get install npmsudo npm install -g yarn
6. wkhtmltopdf installation
Install wkhtmltopdf dependencies:
sudo apt-get install xvfb libfontconfig wkhtmltopdf
[Optional]: Setting Up Production Environment
To isolate the Frappe setup in a dedicated user environment:
[Optional]:Create a New User:
sudo adduser frappe-usersudo usermod -aG sudo frappe-usersu - frappe-user
You'll switch to the newly created user "frappe-user" to perform the following steps.
7. Frappe Installation:
Install Frappe Bench using pip3:
sudo -H pip3 install frappe-bench
Check the installed Bench version:
bench --version
8. Initialize Frappe Bench and Install Frappe Version 15:
Initialize the Frappe Bench with Python 3.11:
bench init frappe-bench --frappe-branch version-15 --python python3.11
After completing the installation, navigate to the frappe-bench directory and create sites and apps..
[Optional]Setup Production:
Configure Frappe Bench for production use:
sudo bench setup production frappe-userbench restart
Open a web browser and navigate to the server's IP address to access the production instance.
Fix for supervisor
bench setup socketiobench setup supervisorbench setup redissudo supervisorctl reloadbench restart
Fix for css
sudo chmod -R o+rx /home/frappe-user
Jinso Raj
Fellow at t4glabs
No comments yet. Login to start a new discussion Start a new discussion