DirectAdmin is a control panel designed to make managing a web server easier. With control panels like DirectAdmin, installing and updating packages isn’t as simple as running apt-get install or yum install, most come with their own build system where packages are compiled with specific settings. DirectAdmin, is no different. It uses its own system called custombuild. At the time of writing this the latest stable version of custombuild is 1.2, though custombuild 2.0 is nearing stable release (currently RC5), but on a production server after running custombuild 1.2 for a while you’d be a little nervous as to how the jump from Apache 2.2 to 2.4 will be, or how your PHP apps are going to handle the jump from 5.3/5.4 to 5.5? Well luckily for you and myself I have a test server lined up to be able to perform the update (or migration I guess). Find out how I got on.
All of this was carried out on a VPS server running CentOS 6.4 and DirectAdmin 1.433. Updated from custombuild 1.2.
Removing custombuild 1.2 (or 1.x)
I would like to think your running custombuild 1.2, but these instructions will work for older versions.
cd /usr/local/directadmin mv custombuild custombuild_1.x wget -O custombuild.tar.gz http://files.directadmin.com/services/custombuild/2.0/custombuild.tar.gz tar xvzf custombuild.tar.gz cd custombuild ./build
With custombuild 2.0 you will have a few more extra config options that you would not have had in 1.2. The usual rules apply, edit the options.conf in your favourite editor and then customise the settings to your liking. Once your done run:
As custombuild is a bit of a step up, it would be wise to rebuild everything initially:
./build all d
The “d” parameter at the end simply means defaults, this means it will automatically answer any questions the build script would usually ask if you ran it without it. Using the default flag is usually wise and safe to do so (it saves you answer yes manually!). Once you’ve run that leave your SSH session running for a while and check back on the progress.
Custom build scripts for certain packages
If your like me you may have a few custom build scripts for certain packages. One of the main custom scripts I use is for ProFTPD and the SFTP module. As I moved my custombuild 1.2 folder I would of lost this config. To get it back simply copy the file back into the custom directory
cd /usr/local/directadmin/custombuild mkdir custom cp ../custombuild_1.x/custom/proftpd /usr/local/directadmin/custombuild/custom/
This has now moved the custom proftpd make script into custombuild 2.0. You can now run:
cd /usr/local/directadmin/custombuild ./build proftpd
Which will now build and install ProFTPD with your custom make script. Repeat as required for other packages you might have custom scripts for
Will my apps work with PHP 5.5?
Custombuild 2.0 brings several core package upgrades including, Apache 2.4, PHP 5.5, MySQL 5.6 and more. A common question everyone wants to know is, will a major PHP upgrade break my site/apps? The honest truth is to test them yourself to be sure, however I can tell you if your site/apps were working on PHP 5.4, its pretty likely your going to be fine. Popular Content Management Systems like WordPress, Drupal, Joomla will be fine. Still you should read the php.net website and the upgrade notes for PHP 5.5 to make sure any of the changes won’t affect your code. Otherwise, I’d say you’d be fine.
With custombuild 2.0 you have the option to run two PHP versions simultaneously, so if upgrading is a problem you can always use this option. Though personally, I find this option quite obnoxious and bear in mind, its another PHP install to maintain, both update and security wise, but the choice is yours.
Is custombuild 2.0 ready for production servers?
Even though custombuild 2.0 is still a release candidate it is pretty much ready for prime time. I will be doing a bit more testing before performing the update on my production VPS server (the one this website is running under), but only for a piece of mind, I haven’t seen any problems so far and don’t expect any. Have fun updating!