11---
2- title : Direct Installation on Debian 11
2+ title : Direct Installation on Debian 12
33layout : default
44parent : Installation
55nav_order : 4
66---
77
8- # Part-DB installation guide for Debian 11 (Bullseye )
8+ # Part-DB installation guide for Debian 12 (Bookworm )
99
10- This guide shows you how to install Part-DB directly on Debian 11 using apache2 and SQLite. This guide should work with
10+ This guide shows you how to install Part-DB directly on Debian 12 using apache2 and SQLite. This guide should work with
1111recent Ubuntu and other Debian-based distributions with little to no changes.
1212Depending on what you want to do, using the prebuilt docker images may be a better choice, as you don't need to install
1313this many dependencies. See [ here] ({% link installation/installation_docker.md %}) for more information on the docker
@@ -37,31 +37,18 @@ Part-DB is written in [PHP](https://php.net) and therefore needs a PHP interpret
3737higher. However, it is recommended to use the most recent version of PHP for performance reasons and future
3838compatibility.
3939
40- As Debian 11 does not ship PHP 8.1 in its default repositories, we have to add a repository for it. You can skip this
41- step if your distribution is shipping a recent version of PHP or you want to use the built-in PHP version. If you are
42- using Debian 12, you can skip this step, as PHP 8.1 is already included in the default repositories.
40+ Install PHP with required extensions and apache2:
4341
4442``` bash
45- # Add sury repository for PHP 8.1
46- sudo curl -sSL https://packages.sury.org/php/README.txt | sudo bash -x
47-
48- # Update package list
49- sudo apt update && sudo apt upgrade
43+ sudo apt install apache2 php8.2 libapache2-mod-php8.2 \
44+ php8.2-opcache php8.2-curl php8.2-gd php8.2-mbstring \
45+ php8.2-xml php8.2-bcmath php8.2-intl php8.2-zip php8.2-xsl \
46+ php8.2-sqlite3 php8.2-mysql
5047```
5148
52- Now you can install PHP 8.1 and the required packages (change the 8.1 in the package version according to the version you
53- want to use):
54-
55- ``` bash
56- sudo apt install php8.1 libapache2-mod-php8.1 php8.1-opcache php8.1-curl php8.1-gd php8.1-mbstring php8.1-xml php8.1-bcmath php8.1-intl php8.1-zip php8.1-xsl php8.1-sqlite3 php8.1-mysql
57- ```
58-
59- The apache2 webserver should be already installed with this command and configured basically.
60-
6149### Install composer
6250
63- Part-DB uses [ composer] ( https://getcomposer.org/ ) to install required PHP libraries. As the version shipped in the
64- repositories is pretty old, we will install it manually:
51+ Part-DB uses [ composer] ( https://getcomposer.org/ ) to install required PHP libraries. Install the latest version manually:
6552
6653``` bash
6754# Download composer installer script
@@ -78,10 +65,9 @@ To build the front end (the user interface) Part-DB uses [yarn](https://yarnpkg.
7865shipped versions are pretty old, we install new versions from the official Node.js repository:
7966
8067``` bash
81- # Add recent node repository (nodejs 18 is supported until 2025)
82- curl -sL https://deb.nodesource.com/setup_18.x | sudo -E bash -
83- # Install nodejs
84- sudo apt install nodejs
68+ curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
69+ sudo apt install -y nodejs
70+
8571```
8672
8773We can install yarn with the following commands:
@@ -117,8 +103,8 @@ Alternatively, you can check out a specific version by running (
117103see [ GitHub Releases page] ( https://github.com/Part-DB/Part-DB-server/releases ) for a list of available versions):
118104
119105``` bash
120- # This checks out the version 1.5.2
121- git checkout v1.5.2
106+ # This checks out the version 2.0.0
107+ git checkout v2.0.0
122108```
123109
124110Change ownership of the files to the apache user:
@@ -142,11 +128,10 @@ configuration:
142128cp .env .env.local
143129```
144130
145- In your ` .env.local ` you can configure Part-DB according to your wishes. A full list of configuration options can be
146- found [ here] ( ../configuration.md ) .
147- Other configuration options like the default language or default currency can be found in ` config/parameters.yaml ` .
131+ In your ` .env.local ` you can configure Part-DB according to your wishes and overwrite web interface settings.
132+ A full list of configuration options can be found [ here] ( ../configuration.md ) .
148133
149- Please check that the ` partdb.default_currency ` value in ` config/parameters.yaml ` matches your mainly used currency, as
134+ Please check that the configured base currency matches your mainly used currency, as
150135this can not be changed after creating price information.
151136
152137### Install dependencies for Part-DB and build frontend
@@ -256,6 +241,7 @@ network to point to the server).
256241
257242Navigate to the Part-DB web interface and login via the user icon in the top right corner. You can log in using the
258243username ` admin ` and the password you have written down earlier.
244+ As first steps, you should check out the system settings and check if everything is correct.
259245
260246## Update Part-DB
261247
@@ -291,7 +277,7 @@ sudo -u www-data php bin/console cache:clear
291277## MySQL/MariaDB database
292278
293279To use a MySQL database, follow the steps from above (except the creation of the database, we will do this later).
294- Debian 11 does not ship MySQL in its repositories anymore, so we use the compatible MariaDB instead:
280+ Debian 12 does not ship MySQL in its repositories anymore, so we use the compatible MariaDB instead:
295281
2962821 . Install maria-db with:
297283
0 commit comments