|
|
Line 93: |
Line 93: |
|
| |
|
| == New version == | | == New version == |
| <p>Install the required packages:</p>
| | [https://docs.part-db.de/installation/installation%20guide-debian.html Installation Guide] |
| <syntaxhighlight lang="console">
| |
| 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
| |
| </syntaxhighlight>
| |
|
| |
|
| <p>Install Symfony:</p>
| | [https://docs.part-db.de/installation/installation_guide-debian.html#update-part-db Update Guide] |
| <syntaxhighlight lang="console">
| |
| wget https://get.symfony.com/cli/installer -O - | bash
| |
| </syntaxhighlight>
| |
| | |
| <p>Install it globally:</p>
| |
| <syntaxhighlight lang="console">
| |
| mv /root/.symfony/bin/symfony /usr/local/bin/symfony
| |
| </syntaxhighlight>
| |
| | |
| <p>Install Node.js:</p>
| |
| <syntaxhighlight lang="console" line>
| |
| curl -fsSL https://deb.nodesource.com/setup_16.x | bash -
| |
| apt install -y nodejs
| |
| </syntaxhighlight>
| |
| | |
| <p>Install Yarn:</p>
| |
| <syntaxhighlight lang="console" line>
| |
| 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
| |
| </syntaxhighlight>
| |
| | |
| <p>Configure locales (languages you want to support):</p>
| |
| <syntaxhighlight lang="console">
| |
| dpkg-reconfigure locales
| |
| </syntaxhighlight>
| |
| | |
| <p>Clone PartDB repository:</p>
| |
| <syntaxhighlight lang="console">
| |
| cd /var/www
| |
| rm -r html
| |
| git clone https://github.com/Part-DB/Part-DB-symfony
| |
| mv ./Part-DB-symfony/* ./
| |
| rm -r Part-DB-symfony
| |
| </syntaxhighlight>
| |
| | |
| <p>Set permissions:</p>
| |
| <syntaxhighlight lang="console">
| |
| chown -R www-data:www-data /var/www
| |
| chmod -R 775 /var/www
| |
| </syntaxhighlight>
| |
| | |
| === Configure Apache ===
| |
| <p>Change webroot:</p>
| |
| <syntaxhighlight lang="console">
| |
| nano /etc/apache2/sites-available/000-default.conf
| |
| </syntaxhighlight>
| |
| | |
| <p>Change:</p>
| |
| <syntaxhighlight lang="console">
| |
| /var/www/html -> /var/www/public
| |
| </syntaxhighlight>
| |
| | |
| <p>Open the following file:</p>
| |
| <syntaxhighlight lang="console">
| |
| nano /etc/apache2/apache2.conf
| |
| </syntaxhighlight>
| |
| | |
| <p>And change this part:</p>
| |
| <syntaxhighlight lang="console" line>
| |
| <Directory /var/www/>
| |
| Options Indexes FollowSymLinks
| |
| AllowOverride None
| |
| Require all granted
| |
| </Directory>
| |
| </syntaxhighlight>
| |
| | |
| <p>to this:</p>
| |
| <syntaxhighlight lang="console" line>
| |
| <Directory /var/www/>
| |
| Options -Indexes
| |
| AllowOverride All
| |
| Require all granted
| |
| </Directory>
| |
| </syntaxhighlight>
| |
| | |
| <p>Restart the apache service:</p>
| |
| <syntaxhighlight lang="console">
| |
| systemctl restart apache2
| |
| </syntaxhighlight>
| |
| | |
| === PartDB ===
| |
| <p>Create file and paste [https://github.com/Part-DB/Part-DB-symfony/blob/master/.env this]:</p>
| |
| <syntaxhighlight lang="console">
| |
| nano .env
| |
| </syntaxhighlight>
| |
| | |
| <p>Copy file:</p>
| |
| <syntaxhighlight lang="console">
| |
| cp .env .env.local
| |
| </syntaxhighlight>
| |
| | |
| <p>Add database to ".env.local":</p>
| |
| <syntaxhighlight lang="console" line>
| |
| DATABASE_URL=mysql://mysql_user_name:your_password@www.theHost.domainName:3306/your_database
| |
| DATABASE_URL=mysql://partdb:e]smoFA14yF1!.6A@192.168.88.13:3306/parts
| |
| </syntaxhighlight>
| |
| | |
| <p>Install composer dependencies and generate autoload files:</p>
| |
| <syntaxhighlight lang="console" line>
| |
| composer install --no-dev
| |
| npm install
| |
| composer recipes
| |
| </syntaxhighlight>
| |
| | |
| <p>Install client side dependencies and build it:</p>
| |
| <syntaxhighlight lang="console" line>
| |
| yarn upgrade
| |
| yarn add ts-loader@8.0.1 --exact
| |
| yarn install
| |
| yarn build
| |
| </syntaxhighlight>
| |
| | |
| <p>Warmup cache:</p>
| |
| <syntaxhighlight lang="console">
| |
| php bin/console cache:warmup
| |
| </syntaxhighlight>
| |
|
| |
|
| == Sources == | | == Sources == |
| * [https://github.com/Part-DB/Part-DB/wiki/EN%3A-Requirements Requirements] | | * [https://github.com/Part-DB/Part-DB/wiki/EN%3A-Requirements Requirements] |
| * [https://github.com/Part-DB/Part-DB/wiki/EN%3A-Installation Install PartDB] | | * [https://github.com/Part-DB/Part-DB/wiki/EN%3A-Installation Install PartDB] |
Network
System
OS: |
Debian Bullseye |
RAM: |
512MB |
Cores: |
1 |
Privileged: |
No |
The PartDB-LXC is reachable under 192.168.88.16
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:
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
Installation Guide
Update Guide
Sources