Sjoerd Maessen blog

PHP and webdevelopment

Update PHP on DirectAdmin

without comments

Making sure a server is up-to-date is essential for security and performance reasons. If you have a server installed with DirectAdmin there really is no reason to wait any longer with the upgrade. Updating PHP, PHPMyAdmin, MySQL and other packages is done trough the “custombuild” script and it’s quite easy.

First make sure your OS is up to date, how to perform this update depends on your OS. In my case I’m running a CentOS server.
yum update
Make sure you double check which packages will be updated.

The next step is updating DirectAdmin
cd /usr/local/directadmin/custombuild

Let’s see if there are updates available
./build update

Which versions are we going to install?
./build versions

Perform the update, be patient, this can take a while.
./build versions

After the update make sure to check any feedback and recommendations of the CustomBuild script. It does perform some security checks to see if software is running as the correct user etc.

If you want to install a different PHP version, for example upgrade PHP 5.x to 7.x you can easily do this by changing the DirectAdmin config file. Make sure to first check the compatibility of PHP extensions you may need in your applications.
vi options.conf
Now hit “i” and change the values, after you are done press escape and enter “:wq” to save and exit VI. You can now run the update process to upgrade PHP.

Needless to say you should make sure backups are in place before performing any upgrade.

Written by Sjoerd Maessen

April 30th, 2016 at 7:46 am

Posted in DirectADmin,Server

Leave a Reply