mirror of
https://github.com/inventree/InvenTree.git
synced 2025-12-16 17:28:11 +00:00
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
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user