From 5904e14b884d2e569ec0420faf29bce1f7056cca Mon Sep 17 00:00:00 2001 From: Thomas Kuschel Date: Sat, 3 Jan 2026 15:18:50 +0100 Subject: [PATCH] UPD partdb --- partdb-install.md | 114 +++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 102 insertions(+), 12 deletions(-) diff --git a/partdb-install.md b/partdb-install.md index 6abc19d..34c3759 100644 --- a/partdb-install.md +++ b/partdb-install.md @@ -1,16 +1,17 @@ -# Installation of part-db on my nginx server at kuschel.at +# Installation of part-db on my nginx server at kuschel.at, or on debian -Date: 2025-10-29 KW4NZ Thomas Kuschel +Date: 2025-12-24 KW4NZ Thomas Kuschel Debian Version: (/etc/debian_version) ``` ssh kuschel cat /etc/debian_version ``` -A: `13.1` , i.e. trixie +A: `13.2` , i.e. trixie ``` ssh kuschel cat /etc/os-release ``` ... to receive more information +<<<<<<< HEAD ## Installations with `sudo apt install xxxxxxx`: @@ -28,6 +29,59 @@ with `sudo apt install xxxxxxx`: wget -O /tmp/composer-setup.php https://getcomposer.org/installer +======= +## Prerequisites + +### Add the user to the sudoer group + +Login as root, entering the root password: +``` +su +``` +And as root: +``` +usermod -aG sudo +``` + +### Installation php + +``` +sudo apt install php +``` + +### Installation nginx Web server +``` +sudo apt install nginx +``` + +### Installation mariadb database +``` +sudo apt install mariadb-server +``` + +### Installation npm (nodejs) +``` +sudo apt install npm +``` + +### Installation of git, curl, zip, etc. +``` +sudo apt install git curl zip ca-certificates software-properties-common \ +apt-transport-https lsb-release nano wget +``` + +### Optional installations: +``` +sudo apt install mc + +``` + +### Install yarnpkg and create a symlink to use yarn command +``` +sudo apt install yarnpkg +sudo ln -s /usr/bin/yarnpkg /usr/local/bin/yarn +``` +>>>>>>> 4f67370 (UPD partdb-install) ## Checks @@ -41,6 +95,7 @@ These settings should be established via the meeting server jitsi ssh kuschel yarn --version ``` A: `1.22.22` +New A: `4.1.0` ### Check if nodejs is installed ``` @@ -74,32 +129,42 @@ Please create a folder for Part-DB and proceed with downloading it. We have completed the installation of all prerequisites and are now prepared to proceed with the Part-DB installation. The next step is to create a folder for Part-DB in the webroot of Apache2/nginx and download it to this folder. The software is downloaded via Git, facilitating straightforward updates at a later date. - +When you are on a local server, first go to the server kuschel: ``` ssh kuschel ``` +First create a folder e.g. at /var/www/partdb ``` -sudo git clone https://github.com/Part-DB/Part-DB-symfony.git /var/www/partdb +sudo makedir -p /var/www/partdb ``` -Make it available for nginx user, first check the name of the user with: +Then check the user name for the Web server, i.e. nginx: ``` -user=$(grep "user" /etc/nginx/nginx.conf | tr -d ';' | cut -d " " -f 2) | echo $user +user=$(grep "user" /etc/nginx/nginx.conf | tr -d ';' | cut -d " " -f 2) +echo $user +export user=$user ``` - Change the owner of the directory recursively - ``` sudo chown -R $user':' /var/www/partdb ``` +Now clone the part-db into that folder: +``` +sudo -u $user git clone https://github.com/Part-DB/Part-DB-symfony.git /var/www/partdb +``` + +Alternatively, you can check out the latest release with: +``` +sudo -u $user git checkout $(git describe --tags $(git rev-list --tags --max-count=1)) +``` ### Create configuration for Part-DB from a template ``` -sudo cp /var/www/partdb/.env /var/www/partdb/.env.local +sudo -u $user cp /var/www/partdb/.env /var/www/partdb/.env.local ``` Now you have to edit the created file `.env.local`, e.g. with ``` -sudo nano -cl /var/www/partdb/.env.local +sudo -u $user nano -cl /var/www/partdb/.env.local ``` We will show this file to you right here: @@ -117,7 +182,7 @@ We will show this file to you right here: # Uncomment this line (and comment the line above to use a MySQL database # DATABASE_URL=mysql://root:@127.0.0.1:3306/part-db?serverVersion=5.7 -DATABASE_URL=mysql://partdb:wRHEFShdB9gG@127.0.0.1:3306/partdb +DATABASE_URL=mysql://partdb:wRHEFShdB9gGxx@127.0.0.1:3306/partdb # Set this value to 1, if you want to use SSL to connect to the MySQL server. It will be tried to use the CA certificate # otherwise a CA bundle shipped with PHP will be used. @@ -131,6 +196,31 @@ DATABASE_MYSQL_SSL_VERIFY_CERT=1 # Emulate natural sorting of strings even on databases that do not support it (like SQLite, MySQL or MariaDB < 10.7) # This can be slow on big databases and might have some problems and quirks, so use it with caution DATABASE_EMULATE_NATURAL_SORT=0 + +################################################################################### +# General settings +################################################################################### + +# The public reachable URL of this Part-DB installation. This is used for generating links in SAML and email templates +DEFAULT_URI="https://depot.kuschel.at" + +################################################################################### +# Email settings +################################################################################### + +# The DSN of the email server that should be used for sending emails (disabled by default) +# See Transport section of https://symfony.com/doc/current/components/mailer.html for available providers and syntax +#MAILER_DSN=null://null +#MAILER_DSN=smtp://user:password@smtp.mailserver.invalid:587 +MAILER_DSN=smtp://no-reply@kuschel.at:xxxxx-xxxx-xxxx@smtp.world4you.com:587 + +# The email address from which all Part-DB emails should be sent. Change this when you configure email! +#EMAIL_SENDER_EMAIL=noreply@partdb.changeme +EMAIL_SENDER_EMAIL=no-reply@kuschel.at +# The sender name which should be used for all Part-DB emails +EMAIL_SENDER_NAME="depot.kuschel.at" +# Set this to 1 to allow reset of a password per email +ALLOW_EMAIL_PW_RESET=1 ... ```