From d3d957e924f630599fa8a3092529a6ed470d36c1 Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 13 Dec 2025 23:38:49 +0100 Subject: [PATCH] Rearrange python package installs in are metal setup (#11005) * Reorder pip installation steps in bare metal setup * Reorder pip installation steps in bare metal setup * remove unused lines --- docs/docs/start/install.md | 61 ++++++++++++++++++++++++++++---------- 1 file changed, 45 insertions(+), 16 deletions(-) diff --git a/docs/docs/start/install.md b/docs/docs/start/install.md index 80e5eaba06..4d888a6c1a 100644 --- a/docs/docs/start/install.md +++ b/docs/docs/start/install.md @@ -108,6 +108,26 @@ The Python packages required by the InvenTree server must be installed into the ``` pip install --upgrade --ignore-installed invoke +``` + +#### Install Python Bindings + +Depending on your database the python bindings must also be installed (into your virtual environment). +For PostgreSQL install: + +``` +pip3 install psycopg pgcli +``` + +For MySQL install: + +``` +pip3 install mysqlclient mariadb +``` + +If all packages have been installed run: + +``` invoke install ``` @@ -136,6 +156,31 @@ And start the postgresql service: sudo service postgresql start ``` +This installs all required Python packages using pip package manager. It also creates a (default) database configuration file which needs to be edited to meet user needs before proceeding (see next step below). + +## Create Database + +As part of the initial setup, an empty database needs to be created. Follow the instructions below particular to your database engine of choice: + +### PostgreSQL + +#### Install PostgreSQL + +Install required system packages: + +!!! info "Sudo Actions" + Perform sudo actions from a separate shell, as 'inventree' user does not have sudo access + +``` +sudo apt-get install postgresql postgresql-contrib libpq-dev +``` + +And start the postgresql service: + +``` +sudo service postgresql start +``` + #### Create Database and User We need to create new database, and a postgres user to allow database access. @@ -155,14 +200,6 @@ grant all privileges on database inventree to myuser; !!! info "Username / Password" You should change the username and password from the values specified above. This username and password will also be for the InvenTree database connection configuration. -#### Install Python Bindings - -The PostgreSQL python binding must also be installed (into your virtual environment): - -``` -pip3 install psycopg pgcli -``` - #### Install Postgresql client If PostgreSQL and InvenTree are installed on separate servers / containers the PostgreSQL client has to be installed also where InvenTree is running. @@ -184,14 +221,6 @@ To run InvenTree with the MySQL or MariaDB backends, a number of extra packages sudo apt-get install mysql-server libmysqlclient-dev ``` -#### Install Python Bindings - -Install the python bindings for MySQL (into the python virtual environment). - -``` -pip3 install mysqlclient mariadb -``` - #### Create Database Assuming the MySQL server is installed and running, login to the MySQL server as follows: