PartDB

From FlowerHouseWiki
Froeling.jpg

Network


IP: 192.168.88.??
MAC: ??
Domain: parts.flowerhouse.at

System


OS: Debian Buster
RAM: 512MB
Cores: 1
Privileged: No

The PartDB-LXC is reachable under 192.168.88.?? which is located in the ServerVLAN.

The subdomain is parts.flowerhouse.at which is handled by the ReverseProxy.

Old version

Install the required packages:

apt install git zip apache2 php php-mysql php-curl libapache2-mod-php php-opcache php-gettext

Configure locales:

dpkg-reconfigure locales

Configure Apache

Open the following file:

nano /etc/apache2/apache2.conf

And change this part:

<Directory /var/www/>
        Options Indexes FollowSymLinks
        AllowOverride None
        Require all granted
</Directory>

to this:

<Directory /var/www/>
        Options -Indexes
        AllowOverride All
        Require all granted
</Directory>

Restart the apache service:

systemctl restart apache2

Configure PHP

Edit php.ini:

nano /etc/php/7.3/apache2/php.ini

Change the following settings:

memory_limit = 128M
upload_max_filesize = 100M
post_max_size = 100M

PartDB

Download and unpack:

wget -O part-db.tar.gz https://github.com/jbtronics/Part-DB/archive/master.tar.gz
tar -xzf part-db.tar.gz -C /var/www
rm part-db.tar.gz

Change folder name to root directory:

cd /var/www
rm -r html
mv Part-DB-master html

Set ownership:

chown -R www-data:www-data html

Generate composer files:

cd /var/www/html
php composer.phar install -o --no-dev

e]smoFA14yF1!.6A

New version

Install the required packages:

apt install git wget curl gnupg composer apache2 php php-mysql php-gd php-intl php-simplexml php-dom php-zip php-xsl php-bcmath php-curl

Install Symfony:

wget https://get.symfony.com/cli/installer -O - | bash

Install it globally:

mv /root/.symfony/bin/symfony /usr/local/bin/symfony

Install Yarn:

curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
apt update
apt install yarn

Configure locales (languages you want to support):

dpkg-reconfigure locales

Clone PartDB repository:

cd /var/www
rm -r html
git clone https://github.com/Part-DB/Part-DB-symfony
mv ./Part-DB-symfony/* ./

Configure Apache

Change webroot:

nano /etc/apache2/sites-available/000-default.conf

Change:

/var/www/html -> /var/www/public

Open the following file:

nano /etc/apache2/apache2.conf

And change this part:

<Directory /var/www/>
        Options Indexes FollowSymLinks
        AllowOverride None
        Require all granted
</Directory>

to this:

<Directory /var/www/>
        Options -Indexes
        AllowOverride All
        Require all granted
</Directory>

Restart the apache service:

systemctl restart apache2

PartDB

Create file and paste this:

nano .env

Add database to ".env":

dsaaf

Install composer dependencies and generate autoload files:

composer install --no-dev

Install client side dependencies and build it:

yarn install
yarn build

Sources