jeudi 14 novembre 2019

Ubuntu 19.10

Upgraded both WS1 and today kid2 to 19.10.  For kid2 I had to go through 19.04 first, then 19.10.

On both I had to reboot on the rescue USB to re-install grub, due to:
error: symbol 'grub_file_filters' not found. 
 
In both cases, I fixed it by booting on a 19.10 USB key, then on the terminal (from memory):
sudo mount /dev/<my_root_partition> /mnt
sudo grub_install --root-directory=/mnt /dev/sda

Managing to boot from the USB dongle was the most difficult part.  I first tried with an SD card in a card reader, that never worked.  Then I used a USB dongle and it was better.  On the BIOS in kid2, you actually want to select boot from HDD not from USB (because it will see the USB dongle as an additional HDD).  Not sure that was the case on WS1.

The 19.10 "rescue" CD was almost unusable on kid2.  It boots into Xorg but with the radeon the display is pretty fu*ked up, almost unreadable.

mercredi 8 mai 2019

NFS server install on WS1

(for sharing pics to be processed by remote darktable on run12l)
  • sudo apt install nfs-kernel-server
  • vi /etc/exports, add
    • /home       run12l(rw,sync,no_subtree_check)
  • sudo systemctl restart nfs-kernel-server

vendredi 1 février 2019

Apache HTTPS certificate and renewal

In November last year I got my first server certificate (from letsencrypt.org).  So it's going to expire next week and it's really time to have a look at renewing it.
Turns out, I got the first certificate with certbot certonly, and it was pretty easy to get it renewed with certbot renew
Apache needed a restart to use the new certificate but now it's fine, and good to somewhere in early May.
I will have a look at automating the renewal with cron.

samedi 10 novembre 2018

Piwigo on server

So I'm reinstalling Piwigo and stuff on my little server this time.

Software

sudo tasksel
Select LAMP server, OK -> install 28 packages or so.  Test: http://kid2.lan/ (OK: apache default page).

sudo apt install php7.2-mbstring php7.2-gd php7.2-mysql
Change the following in  /etc/php/7.2/apache2/php.ini :
upload_max_filesize = 20M
post_max_size = 20M
max_file_uploads = 99

Database

Create piwigo.sql script with the necessary CREATE DATABASE and so on.
mysql -u root -p < /home/luc/Documents/Config/piwogo.sql

Piwigo

cd /tmp && wget -O piwigo.zip \
http://piwigo.org/download/dlcounter.php?code=latest
unzip piwigo.zip
sudo mv piwigo /var/www/html/
sudo chown -R www-data:www-data /var/www/html/piwigo/
sudo chmod -R 755 /var/www/html/piwigo/

Apache configuration

sudo vi /etc/apache2/sites-available/piwigo.conf

Create this file as in previous blog entry, but on port 80 and without the SSL stuff for the moment.  We want to init Piwigo before, but you could do it after the SSL/HTTPS configuration too I guess.

Piwigo initialization

Goto http://kid2.lan/piwigo/ and the initialization script starts.  Test under HTTP for the time being.

SSL (HTTPS) configuration

Install certbot:
sudo apt install certbot
The rest of the instructions for using certbot it at :
https://desec.io/#!/en/docs/certbot

Apparently certbot needs curl to be installed, but I had to first upgrade urbackup-server to 2.2.11 to remove a dependency on libcurl3 from urbackup-server-2.2.7 (otherwise installing curl would have removed urbackup-server).
When the certificate was received, I just changed piwigo.conf to activate the SSL stuff, and also had to enable the Apache ssl module:

sudo vi /etc/apache2/sites-available/piwigo.conf
sudo a2enmod ssl







Piwigo is pretty good hey

yes it it.  Also, I played a bit with port 443 forwarding and https configuration in Apache, and it finally kind of works.

Dynamic DNS

I have used  https://desec.io/ after trying also no-ip before.  Works fine.  In the Proximus BBOX I did setup the dyndns client parameters:

Provider: Custom
User Name: myhostIchoseTheNameOf.dedyn.io (as on desec.io: my domain)
Password: (my password at desec.io)
Hostname: myhostIchoseTheNameOf.dedyn.io
Custom Service:
HTTPS: On
Server: update.dedyn.io
Port: 443
Request:  ?hostname=%5BmyhostIchoseTheNameOf.dedyn.io%5D&myip=%5BIP%5D
Update Interval: 3600

DHCP

The HTTPS server needs a fixed IP address so we can do port forwarding in the next step.  Just assign one in the DSL router dialogs

Port forwarding

Forward only port 443 to the fixed IP address you assigned to the HTTPS server

SSL

Obtaining the first certificate was OK after a lot of reading, and some trial and error.  I still have to document how this can be done through let's encrypt

Apache:

 <VirtualHost *:443>
        ServerAdmin admin@myserver.lan
        DocumentRoot /var/www/html/piwigo
        ServerName myhostIchoseTheNameOf.dedyn.io

        SSLEngine on
        SSLProtocol all -SSLv2
        SSLCertificateFile /etc/letsencrypt/live/myhostIchoseTheNameOf.dedyn.io/cert.pem
        SSLCertificateKeyFile /etc/letsencrypt/live/myhostIchoseTheNameOf.dedyn.io/privkey.pem
        SSLCertificateChainFile /etc/letsencrypt/live/myhostIchoseTheNameOf.dedyn.io/fullchain.pem
     <Directory /var/www/html/piwigo/>
        Options +FollowSymlinks
        AllowOverride All
        Require all granted
     </Directory>

     ErrorLog ${APACHE_LOG_DIR}/error.log
     CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>

mardi 30 octobre 2018

Piwigo photo gallery test

So I followed instructions, mainly from this site.
PHP 7.2 is available in Ubuntu now so I used the repositories instead of a PPA to install it.  In addition I had to install the following optional php modules:
  • sudo apt install php7.2-gd
  • sudo apt install php7.2-mysql
  • sudo apt install php7.2-mbstring
  • ???
The proceeded to finish the install using the web interface.  Worked OK, uploaded a bunch of photos.  So far so good, starting to test.  Idelly this should provide:
  • Easy bulk upload from Darktable
  • Use metadata when available in the JPEG file, and allow searching on them:
    • title
    • description
    • tags (keywords)
    • date taken
    • geotagging
    • ...
  • Authenticate users in the web interface
  • Allows users to view but also download to their local device (phone, pc)
  • ?
So after some testing:
  • Easy bulk upload from Darktable: not directly.  I thought it was possible but the feature request about this is not progressing much in 5 years.  Exporting to JPEG then uploading through the web interface is possible of course.
  • Authenticate users in the web interface : Yes, looks fine
  • Allows users to view but also download to their local device (phone, pc) : Yes, look fine
  • Use metadata when available in the JPEG file, and allow searching on them: not out of the box.  There used to be a plugin (Advanced Metadata) to do that, but it's not been maintained and doesn't run on current Piwigo releases apparenty.  So this is a show stopper for me.
Conclusion: dropped user and database from mysql, left the rest of the LAMP stack installed, might get used by something else later on... then noticed that Shotwell has a working Publish interface to Piwigo so started all over again to test that.

Desktop is too slow, upgraded

So I bought another 10 year old tower to replace it.  Bought an HP xw4600 workstation, nice hardware for its time.  Q6600 quad core, 4gb ecc ram with 2 free dimm slots, relatively quiet, nvidia quadro 285 with dual monitor support, free drive bays, multi card reader, lots of PCI slots, USB, firewire and ps2 ports, raid sata controller with 2x250gb caviars, DVD burner.
Installed Lubuntu on one of the drives, added urbackup client, then photo apps.  Set up autofs as NFS client. Tested Darktable using NFS and local copies, it looks much faster than the old one.  Exports still taking time over NFS at least.
So I removed the 2tb home drive from kid3 and installed it in the HP. Worked likes treat, but I still need to do some user and group admin.  In the meantime I finished 45 photos in Darktable by working locally and found no performance issues even though YouTube was consuming CPU and ram at the same time.
Memory could be upgraded, need to find some pc6400e dimms as the non-ecc support seems to be limited in this motherboard.
I also need to find a couple sata cables to get the DVD drive working (I stole the DVD cables for the 2tb HDD).
My monitors work fine with the VGA adapter that came with it but I now need a HDMI to dvi-D cable to extend my laptop display.  Think I already have that somewhere.
Next steps are the completion of a first full backup, RAM expansion to at least 8gb and later will be to clean up the laptop home dir and fix the filesystem and dpkg issue, maybe a reinstall is needed.
I'll be left with two functional tower PCs with little or no RAM or disks.  Maybe I'll try to refurbish and donate them.