Install notes for installing PartKeepr 1.4.0 database application on Ubuntu Server 18.04 LTS

These are just quick notes, not a guide!

Installing PartKeepr on Ubuntu 18.04 LTS instead of 19.10, because 18.04 uses php 7.2 by default (supported) choosing HTTP Basic auth instead of WSSE since previous installs with WSSE were nothing but trouble. I am only using this database locally in an Oracle Virtualbox VM on a private LAN, so I'm not too concerned.

Previous install with WSSE had a problem a few days into using it and wouldn't let me log in. I saw some error in the logs about LDAP

Install notes:

Packages installed:

mysql-server php php-apcu php-apcu-bc php-curl php-gd php-intl php-ldap php-mysql php-dom php-xml php-zip unzip apache2 libapache2-mod-php avahi-daemon

made a phpinfo() file, tested it.. seems to be working. not using FCGI at this point

edit /etc/mysql/my.cnf and add:

[mysqld] default-authentication-plugin=mysql_native_password

immediately restart mysql

After extracting PartKeepr files to /var/www/foldername used the following commands to set up file permissions:

sudo chown -R $(whoami):www-data . sudo find -type d -exec chmod 770 {} + sudo find -type f -exec chmod 660 {} +

Enable Apache rewrite:

sudo a2enmod userdir rewrite

Summary order of operations:

  • install packages with apt-get
  • configured mysql securely
  • configured apache
  • download/install partkeepr
  • fix permissions
  • run partkeepr web-based setup

I created the mysql database partway through so it was ready, using the code generated on the PartKeepr setup page, and not based on any other website installation instructions.

had a weird error when warming up the cache PHP Notice: A non well formed numeric value encountered in /var/www/pk/app/PartKeeprRequirements.php on line 126, referer: http://localhost/setup/

You can fix this quick and dirty by editing /vendor/symfony/monolog-bundle/DependencyInjection/Configuration.php

Open up the above file, and around line 594 comment out or remove line below:

// ->ifTrue(function ($v) { return ('fingers_crossed' === $v['type'] || 'buffer' === $v['type'] || 'filter' === $v['type']) && 1 !== count($v['handler']); })

add the following line:

->ifTrue(function ($v) { return ('fingers_crossed' === $v['type'] || 'buffer' === $v['type'] || 'filter' === $v['type']) && (empty($v['handler']) || !is_string($v['handler'])); })

The installer will then finish the install and you have access to the application.

add a cronjob for PartKeepr with a command like:

sudo nano /etc/cron.d/partkeepr

Add a cronjob entry like this example (change path to suit your install):

0 0,6,12,18 * www-data /usr/bin/php /var/www/partkeepr-1.4.0/app/console partkeepr:cron:run

Next Post Previous Post