DirectAdmin server updaten

Om DirectAdmin te updaten moet je Root (sudo) rechten hebben.

Update eerst het systeem zelf:

Voor Debian/Ubuntu:
apt-get update && apt-get dist-upgrade

Voor RedHat/CentOS:
yum update

Update de custombuild software list:
DirectAdmin comes with custombuild which is the update manager in this case. First we want to navigate to the custombuild directory:
cd /usr/local/directadmin/custombuild/

We want to clean all downloaded software sources first to save space and build issues:
./build clean

Now we want to update the software list:
./build update

Show the available updates:
Now that the software list is updated we can see which updates can be applied, custombuild has a function for this:
./build versions

Latest version of DirectAdmin: 1.49.1
Installed version of DirectAdmin: 1.44.3

DirectAdmin 1.44.3 to 1.49.1 update is available.

Latest version of Apache: 2.4.18
Installed version of Apache: 2.4.7

Apache 2.4.7 to 2.4.18 update is available.

Latest version of PCRE: 8.20
Installed version of PCRE: 8.20

Latest version of curl: 7.47.0
Installed version of curl: 7.34.0

cURL 7.34.0 to 7.47.0 update is available.

Latest version of FreeType: 2.6.2
Installed version of FreeType: 2.5.2

FreeType 2.5.2 to 2.6.2 update is available.

Latest version of dovecot: 2.2.21
Installed version of dovecot: 2.2.10

Dovecot 2.2.10 to 2.2.21 update is available.

Latest version of Exim: 4.86
Installed version of Exim: 4.82

Exim 4.82 to 4.86 update is available.

Latest version of MySQL: 5.5.48
Installed version of MySQL: 5.5.35

MySQL 5.5.35 to 5.5.48 update is available.

Latest version of PHP (CLI): 5.3.29
Installed version of PHP (CLI): 5.3.28

PHP5 (CLI) 5.3.28 to 5.3.29 update is available.

Latest version of RoundCube webmail: 1.1.4
Installed version of RoundCube webmail: 0.9.5

RoundCube webmail 0.9.5 to 1.1.4 update is available.

Latest version of phpMyAdmin:
Installed version of phpMyAdmin:

Latest version of SquirrelMail: 1.4.22
Installed version of SquirrelMail: 1.4.22

If you want to update all the available versions run: /usr/local/directadmin/custombuild/build update_versions

As you can see there are alot of updates pending on this random server I’ve picked, now we want to apply all the updates that are shown above.

Updating the software using custombuild:
Now we want to apply all mentioned updates on the server. This can be performed with:
./build update_versions

This update process may take some time as all software is compiled on the server and usually takes from 5 until 60 minutes to complete and depends on the amount of updates that needs to be applied and the speed/resources of the server.

A note on the updates:
For Apache, PHP and MySQL only the subreleases are applied. As seen in this case PHP will be updated from 5.3.28 to 5.3.29 and MySQL from 5.5.35 to 5.5.48. Custombuild will never upgrade this to a newer major release unless you explicitly specify it. All other software will be updated to the latest version DirectAdmin delivers at that time.

Also note that any 3rd party compiled modules for PHP and Apache may need to recompiled manually if PHP and/or Apache was updated. Refer to the installation manual of the module to see how this can be achieved.

In this particular case PHP is pretty outdated and is EOL as we speak. Here PHP should be updated to at least 5.6 but since this is not my machine I cannot force this.

If you want to update PHP, MySQL or Apache to a newer major release you can specify this in the “options.conf” inside the custombuild directory. Make sure that your websites are capable of running on the newer version(s) that you want to apply or that you need to update the websites afterwards or before starting the update.

Troubleshooting update issues:
Most of the time the updates will apply without errors, but are always possible to receive, below are a couple of cases that may show up:

One of the most common errors is when compiling PHP and/or FreeType which will halt the update process about libxml and/or libpng. This can be easily be solved by running the update for these parts of software first:

For libxml:
./build libxml2 d

For libpng:
./build libpng d

For FreeType:
./build freetype d

Once finished you can resume the update process:
./build update_versions

The update of MySQL may be interrupted about libaio missing on your system which mainly occurs on RedHat/CentOS based systems, it is easy to solve it by installing libaio:
yum install libaio libaio-devel

Once finished you can resume the update process:
./build update_versions

Geef een reactie

Het e-mailadres wordt niet gepubliceerd. Vereiste velden zijn gemarkeerd met *