[LINUX] INSTALL FRAPPE ERP UBUNTU - fourslickz/notes GitHub Wiki

Install prerequisites

sudo apt update
sudo apt install -y python3-dev python3-setuptools python3-pip python3-venv git mariadb-client-core-10.6 redis-server wkhtmltopdf

Install NodeJS & Yarn

curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt install -y nodejs
npm install --global yarn

Install bench

pip3 install frappe-bench
bench init frappe-bench --frappe-branch version-15
cd frappe-bench

Check DB Connection

mysql -h 10.130.249.233 -P 6033 -u frappeadmin -p

Initialize project

bench init frappe-bench --frappe-branch version-15

bench new-site erp-dbesto-be.ayosatu.my.id \
  --db-host 10.130.249.233 \
  --db-port 6033 \
  --db-root-username frappeadmin \
  --db-root-password your-password-db \
  --admin-password frappeAdmin

bench get-app erpnext --branch version-15
bench --site erp-dbesto-be.ayosatu.my.id install-app erpnext
bench get-app [email protected]:IT-RIN-AYOSATU/ERP-DBESTO-FINANCE-APP.git --branch staging
bench --site erp-dbesto-be.ayosatu.my.id install-app ebmapp
bench --site erp-dbesto-be.ayosatu.my.id migrate

Upgrade Python requirements

source env/bin/activate
pip3 install -r ./apps/ebmapp/ebmapp/requirements.txt

Configure sites

nano sites/erp-dbesto-be.ayosatu.my.id/site_config.json
{
 "db_name": "_881bf8e88aff5e17",
 "db_password": "UPsLZFJKCHUrDWQI",
 "db_type": "mariadb",
 "allow_cors": ["http://localhost:5173", "https://fe-dbesto.ayosatu.my.id"]
}

Optional Setup

bench start
bench setup nginx
bench setup supervisor

bench --site all clear-cache
bench --site all migrate