|
1 min read
How to Install Frappe Bench on Arch Linux
π¦ 1. Install System Dependencies
Begin with a full system update:
sudo pacman -Syu
Install all necessary packages:
sudo pacman -S \
git python python-pip python-virtualenv \
mariadb valkey \
nodejs npm yarn \
imagemagick wkhtmltopdf \
cronie \
base-devel gcc cmake make
sudo systemctl enable --now cronie
ποΈ 2. Configure MariaDB
Install MariaDB (if not already installed):
sudo pacman -S mariadb
Initialize the database files:
sudo mariadb-install-db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
Start and enable MariaDB:
sudo systemctl enable --now mariadb
Secure the server:
sudo mysql_secure_installation
π₯ 4. Start Valkey (Redis Replacement)
Arch Linux uses Valkey instead of Redis.
Start and enable it:
sudo systemctl enable --now valkey
Check that itβs running:
sudo systemctl status valkey
sudo ss -ltnp | grep valkey # checking on what ports the valkey(redis serves) serving
LISTEN 0 511 127.0.0.1:6379 0.0.0.0:* users:(("valkey-server",pid=946,fd=8)) LISTEN 0 511 [::1]:6379 [::]:* users:(("valkey-server",pid=946,fd=9))
π οΈ 5. Install Bench CLI
python -m venv env
source env/bin/activate
Install Frappe Bench through pip:
pip install frappe-bench
Verify:
bench --version
ποΈ 6. Initialize a New Bench
Create your bench environment:
bench init mybench
Enter it:
cd mybench
update the common site config to match redis server port
β¦/prob/sites β― cat common_site_config.json
{
"background_workers": 1,
"default_site": "frontend",
"file_watcher_port": 6787,
"frappe_user": "inxeoz",
"gunicorn_workers": 17,
"live_reload": true,
"rebase_on_pull": false,
"redis_cache": "redis://127.0.0.1:6379",
"redis_queue": "redis://127.0.0.1:6379",
"redis_socketio": "redis://127.0.0.1:6379",
"restart_supervisor_on_update": false,
"restart_systemd_on_update": false,
"serve_default_site": true,
"shallow_clone": true,
"socketio_port": 9000,
"use_redis_auth": false,
"webserver_port": 8000
}
β¦/prob/sites β―
π 7. Create a New Frappe Site
Run:
bench new-site mysite.local
Enter MariaDB root password when asked.
π 8. Start the Development Server
bench use mysite.local #setting default
bench start
Now open:
http://localhost:8000