Install Bench Command Line Interface (CLI)
After setup the Ubuntu 22.04 in Windows, we can proceed to install Bench CLI. Bench is a tool used to manage Frappe and ERPNext applications.
Prerequisites
-
Ubuntu 22.04+ installed on WSL (follow the previous guide if not already done).
-
Python 3.6+ installed (Ubuntu 22.04 comes with Python 3.10 by default).
curlandgitinstalled.
Step 1: Update and Install Dependencies
-
Open your Ubuntu 22.04 terminal in WSL.
- Update the package list and upgrade installed packages:
sudo apt update
- Install essential dependencies:
sudo apt install git python-is-python3 python3-dev python3-pip redis-server
Step 2: Install MariaDB
You can install MariaDB by executing this command:
sudo apt install mariadb-server mariadb-client
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:
sudo mariadb-secure-installation
Remember: only run the command "sudo mariadb-secure-installation" it if you're not prompted the password during setup.
Step 3: Edit MariaDB configuration file
To edit the configuration file for MariaDB, exexcute this command:
nano /etc/mysql/my.cnf
and add this configuration:
[mysqld]character-set-client-handshake = FALSEcharacter-set-server = utf8mb4collation-server = utf8mb4_unicode_ci
[mysql]default-character-set = utf8mb4
Step 4: Install Node
We can install the node by using nvm:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
After installing the nvm, you may have to close your terminal and open another one. Now run the following command to install node.
nvm install 18
Verify the installed version, by running:
node -v
Example Output: v18.20.4
Step 5: Install Yarn