Outils pour utilisateurs

Outils du site


issue122:labo_linux

Ceci est une ancienne révision du document !


Several months ago, I migrated one of the software packages we use at work to a new server. Getting time to focus on something as large as a server migration is rare for me since I usually have a bit less than 6 hours a week to look into anything new. In this instance, I was familiar with the software package, PCRT (PC Repair Tracker), but the migration was both a change in hardware and updated software - what could possibly go wrong?

Our original “Repair Tracker” was running smoothly to this point, but there were several problems: • We were using a fairly outdated version of PCRT (v2.2 when 4.1 was out). • The “server” we were running it on wasn’t in as secure a location as most of our other servers. • We weren’t even sure we had regular backups (we had a “dd” backup that was old, so we could restore the machine if we needed to, but we wouldn’t have recent data). • We’ve started to virtualize more servers and this was another physical machine that could break down.

The plan was to migrate the existing database and v2.2 of PCRT to our newly spun virtual server, do all the necessary upgrades to get to version 4.1, then tackle backups. As it turned out, we were regularly backing up the database and software, but as hinted, the installation didn’t go so smoothly on the new server.

The problem? Ubuntu 16.04 server. More accurately, the newer version of PHP on Ubuntu server and PCRT 2.2 didn’t seem to jive well together. Luckily, one of our sysadmins had run into a similar issue with other software. The solution was to run an older version of PHP (we ended up with two versions of PHP installed with the older active). Lorna Jane Mitchell (author of PHP Web Services and PHP Master) also ran into this issue and documented which PPA she used to install both versions of PHP, I just reversed the second last step:

https://lornajane.net/posts/2016/php-7-0-and-5-6-on-ubuntu

sudo add-apt-repository ppa:ondrej/php

sudo apt update

sudo apt install php5.6

sudo a2dismod php 7.0

sudo a2enmod php5.6

sudo service apache2 restart

Of course this wasn’t the only answer, there were a number of PHP 5.6 dependencies I also needed to install, but they all got sorted out by reading the error logs during the install of PCRT.

All of this could have been avoided if we just installed Ubuntu server 14.04 and used the version of PHP default with it, however one of our goals was to be as up-to-date as possible, and, when I took this approach on another development machine, it also didn’t quite work out as expected.

On that development machine we wanted to run a number of non-virtualized PHP software packages, one of which was PCRT, the other Owncloud. Because it seemed the simplest route to get PCRT installed, we installed Ubuntu server 14.04. But that turned out to be a mistake because Owncloud wanted a later version of PHP (5.59 was installed; it needed 5.6).

In this case, I employed the same tactic, but ran a2dismod for version 5.59 and a2enmod for 5.6. Better planning might have foreseen this problem, but often time is precious and I end up having to figure out issues as we go. Two separate virtualized environments would have also solved this problem, and it’s the direction we’re headed, but it just got me thinking that it’s a bit of a pain having to maintain several versions of PHP to run the software we want to run.

Technologies like Docker suddenly seem more viable, even for a smaller organization.

issue122/labo_linux.1499175573.txt.gz · Dernière modification : 2017/07/04 15:39 de auntiee