Inventree is an open-source Inventory and Manufacturing Management System that helps to manage your warehouse, stock, and manufacturing processes. In this tutorial, you will learn how to install Inventree on Fedora Server.
First, update your system packages and install the necessary packages required to run Inventree.
sudo dnf update -y
sudo dnf install -y git gcc python3-devel ruby ruby-devel redhat-rpm-config zlib-devel openssl-devel
Inventree uses Node.js and npm to compile client-side assets. Use the following command to install Node.js and npm on your system.
sudo dnf install -y nodejs
Inventree uses a PostgreSQL database to store its data. Use the following command to install PostgreSQL on your system.
sudo dnf install -y postgresql-server postgresql-contrib postgresql-libs
After the installation, initialize the PostgreSQL database and start the PostgreSQL service.
sudo postgresql-setup initdb
sudo systemctl start postgresql.service
sudo systemctl enable postgresql.service
Clone the Inventree repository to your system using the following command.
git clone https://github.com/inventree/InvenTree.git
Inventree uses Python 3 to run the server, and it is recommended to use a virtual environment to isolate the project's dependencies. Use the following commands to create a virtual environment and activate it.
cd InvenTree
python3 -m venv inventree_env
source inventree_env/bin/activate
Now, install the project dependencies using pip.
pip install -r requirements.txt
Before running Inventree for the first time, you need to set up the PostgreSQL database. Use the following commands to create a new PostgreSQL user and database.
sudo -u postgres createuser --createdb --username postgres --no-createrole --no-superuser inventreeuser
sudo -u postgres createdb --username postgres --owner inventreeuser inventree
Next, create a settings file for Inventree using the following command.
cp InvenTree/settings.py.sample InvenTree/settings.py
Edit the settings.py file with your PostgreSQL database configuration.
vi InvenTree/settings.py
DATABASES = {
"default": {
"ENGINE": "django.db.backends.postgresql",
"NAME": "inventree",
"USER": "inventreeuser",
"PASSWORD": "your-password",
"HOST": "localhost",
"PORT": "",
}
}
Inventree uses Django's built-in migration system to setup the database schema. Use the following commands to apply the migrations.
python manage.py makemigrations
python manage.py migrate
Inventree uses Node.js and npm to compile client-side assets. Use the following commands to install the required dependencies and compile the assets.
sudo npm install -g yarn
yarn install
yarn run build
Finally, create a superuser account to access the Inventree admin panel.
python manage.py createsuperuser
You can now start the Inventree server using the following command.
python manage.py runserver
By default, the server listens on port 8000. You can access the Inventree admin panel by visiting http://localhost:8000/admin in your web browser.
You have successfully installed Inventree on Fedora Server. You can now start using Inventree to manage your inventory and manufacturing processes.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!