issue122:labo_linux
Différences
Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente | ||
issue122:labo_linux [2017/07/04 15:39] – créée auntiee | issue122:labo_linux [2017/07/11 14:34] (Version actuelle) – d52fr | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | 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? | + | **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: | Our original “Repair Tracker” was running smoothly to this point, but there were several problems: | ||
Ligne 5: | Ligne 5: | ||
• The “server” we were running it on wasn’t in as secure a location as most of our other servers. | • 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 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. | + | • We’ve started to virtualize more servers and this was another physical machine that could break down.** |
+ | |||
+ | Il y a plusieurs mois, j'ai transféré l'un des paquets logiciels que nous utilisons au bureau vers un nouveau serveur. Avoir le temps de me concentrer sur quelque chose d' | ||
+ | |||
+ | Notre « Repair Tracker » fonctionnait très bien jusqu' | ||
+ | • La version de PCRT que nous utilisions était plutôt obsolète (nous avions la 2.2 alors que la 4.1 a été publiée). | ||
+ | • L' | ||
+ | • Nous n' | ||
+ | • Nous commençons à virtualiser de plus en plus de serveurs et celui-ci n' | ||
- | 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 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: | 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:// | ||
+ | |||
+ | sudo add-apt-repository ppa: | ||
+ | |||
+ | sudo apt update | ||
+ | |||
+ | sudo apt install php5.6 | ||
+ | |||
+ | sudo a2dismod php 7.0 | ||
+ | |||
+ | sudo a2enmod php5.6 | ||
+ | |||
+ | sudo service apache2 restart** | ||
+ | |||
+ | L' | ||
+ | |||
+ | Le problème ? Ubuntu server 16.04. Plus précisément, | ||
+ | |||
https:// | https:// | ||
Ligne 24: | Ligne 50: | ||
sudo service apache2 restart | 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. | + | **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. | 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). | + | 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).** |
+ | |||
+ | Bien entendu, ce n' | ||
+ | |||
+ | On aurait pu éviter tout ce tracas en installant simplement Ubuntu server 14.04 et en utilisant la version par défaut de PHP incluse. Toutefois, l'un de nos objectifs était d' | ||
+ | |||
+ | Sur la machine de développement, | ||
- | 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. | + | **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. | + | Technologies like Docker suddenly seem more viable, even for a smaller organization. ** |
+ | |||
+ | Dans ce cas-là, j'ai utilisé la même tactique, mais j'ai exécuté a2dismod pour la version 5.59 et a2enmod pour la 5.6. Une meilleure planification aurait pu sans doute prévoir le problème, mais, souvent, le temps est compté et je finis par devoir résoudre des problèmes en cours de route. Deux environnements virtualisés distincts auraient également résolu le problème, et c'est la direction que nous prenons, mais cela m'a montré que c'est un peu fastidieux de devoir maintenir plusieurs versions de PHP pour pouvoir lancer les logiciels que nous voulons. | ||
+ | |||
+ | Tout d'un coup, des technologies comme Docker semblent plus viables, même pour une petite ou moyenne organisation. | ||
issue122/labo_linux.1499175573.txt.gz · Dernière modification : 2017/07/04 15:39 de auntiee