Installing (upgrading?) compile?

sparek

Verified User
Joined
Jun 27, 2019
Messages
465
So... installing Directadmin for the first time, just getting started with all of this. I see where it's compiling almost everything that it uses - I suppose my question is, has there been any thought of going towards a more RPM based system? That would greatly reduce the installation time, and presumably make upgrading much easier.

I suppose this is hindered a bit by the fact that Directadmin supports Debian and FreeBSD which don't operate RPMs. And I'm not sure if that's something you really want to fluff the feathers on. But... I'm guessing your going to see a large influx of customers coming from cPanel - which operates on RHEL/CentOS/CloudLinux which is all RPM based.

I suppose ultimately my question is... are there any plans or thoughts of moving to a RHEL/CentOS/CloudLinux only setup so that all of this installation and upgrading can be streamlined? Perhaps using the Remi repository for PHP? There's also Apache 2.4.39 in the CodeIT repository.

Just my opinion... I would kind of think this would be better moving forward. But I suppose if you are really tied to providing Debian and FreeBSD support, then this would not be an option.
 
Personally I prefer the way Custombuild work today, because I like to install most of the software from source, with the benefit of always having the newest official versions available very shortly after they are released.
 
I just remember cPanel before they went to rpms in Apache and PHP... it was just an absolute pain when new versions of PHP were released and then "oops forgot to compile that option... recompile". The move to RPMs was just so much nicer.

You are correct in that relying on RPMs creates a delay whenever a new version is released. I'm not sure how quickly the Remi repository gets the newer versions of PHP. But this wouldn't necessarily be something that Directadmin would have to maintain... just rely on the Remi repository.

Does Directadmin compile everything? I think I saw exim, dovecot, and pureftpd being compiled too. You're looking at a much, much longer installation time with compiling vs. RPMs and those systems don't really change that much.

Just an observation and suggestion.
 
Bear in mind that DA has always done it this way, DA is intended for a more technically inclined audience.

We all have to be realistic in what to expect in the early days of what's going to be massive growth for them, I'm just grateful it exists at all :)

Even if they don't do it officially, I'm sure someone will before long.
 
I suppose that could be my next question... and probably not really an answer.

I know Remi (er... at least I think, it's been a bit since I've used it) installs it's PHP versions in /opt - so it really shouldn't be a stretch for me to build a php-fpm system using that system.

I've never used CodeIT for Apache, but it looks like it installs Apache in a more standard placement - /usr/bin - how would that interfere with Directadmin's system?

In a sense, the Remi PHP repository would duplicate something I did a long time ago on cPanel. Before cPanel had multiple PHP versions and when they were still using compiled Apache/PHP - I'd just let cPanel install and do whatever it wanted to. Then I recompiled my own PHP versions in their own directory and set up suPHP to use those versions instead of the cPanel based versions. This afforded me the luxury - as @ditto referred to - of compiling new versions of PHP as soon as they were released - I didn't have to wait for cPanel's EasyApache to gain them. This was either before Remi existed or definitely before I knew it existed.

Probably a lesser concern for exim, dovecot, pureftpd, etc - since they probably don't change that often ... I'm not exactly sure what their typical release schedule is. I know exim recently had a huge flaw, but before that I'm not sure when the last update to the code was.

Apache probably doesn't update that often either, but probably more often than the packages listed above. So how would replacing Directadmin's compiled version with CodeIT's (or maybe there's another repository?) version affect Directadmin? I assume nobody really knows the answer to that - but in terms of unofficially... if someone has been that route, any guidance?
 
I just remember cPanel before they went to rpms in Apache and PHP... it was just an absolute pain when new versions of PHP were released and then "oops forgot to compile that option... recompile". The move to RPMs was just so much nicer.

You are correct in that relying on RPMs creates a delay whenever a new version is released. I'm not sure how quickly the Remi repository gets the newer versions of PHP. But this wouldn't necessarily be something that Directadmin would have to maintain... just rely on the Remi repository.

Does Directadmin compile everything? I think I saw exim, dovecot, and pureftpd being compiled too. You're looking at a much, much longer installation time with compiling vs. RPMs and those systems don't really change that much.

Just an observation and suggestion.

Regarding what custombuild compile, please see the list on the "CustomBuild 2.0 FAQ": https://forum.directadmin.com/showthread.php?t=44743 - also that FAQ have good information about how to use custombuild.

Regarding the quote: "oops forgot to compile that option... recompile", please note that all the default options of for example PHP is found at /usr/local/directadmin/custombuild/configure/fpm/configure.php7X and PHP-FPM conf at /usr/local/directadmin/custombuild/configure/fpm/conf/php-fpm.conf.7X - and you can add custom versions of those files wich never is overwritten by creating them at /usr/local/directadmin/custombuild/custom/fpm/configure.php7X and /usr/local/directadmin/custombuild/custom/fpm/conf/php-fpm.conf.7X

Same thing for other stuff, like custom opcache.ini can be placed at /usr/local/directadmin/custombuild/custom/opcache/opcache.ini - those are only some examples of many other you can have in custom directory. Only remember that the files you upload to /usr/local/directadmin/custombuild/custom must have file permission set to 0755

Also to see a updated list of what you can compile in custombuild and commands you can use, do this:

Code:
cd /usr/local/directadmin/custombuild
./build

To see what needs to be updated do:
Code:
./build update
./build versions

All settings for custombuild is in /usr/local/directadmin/custombuild/options.conf this file, wich you should edit depending on how you like/need it. Also doing "./build options" will display many of your current settings.

I feel it can go a very long time between every time Exim release a new version (unless there is a security fix), but PHP releases a new version every month, and Apache usually release a new version every 3-4 month. And a lot of the other stuff that is compiled by custombuild also has frequent new releases.
 
I'll have to read through the Custombuild stuff - I'm honestly just getting my toes wet with all of this.

I suppose the argument with PHP and RPMs - is just, if you have 30 servers - compiling can take a while, especially if those are busy servers. And say a user suddenly needs intl extensions, in a compile environment you'd have to recompile PHP with intl (or I suppose you could use shared modules) - but still there's a compile step necessary. Whereas with RPM, you'd just install an php intl package (which is essentially a shared module).

I gave cPanel a ton of credit when they moved towards an RPM system over the compiling system. I suppose Directadmin doing a compile feels like a step backwards?

But I do appreciate a level of customization.
 
Whereas with RPM, you'd just install an php intl package (which is essentially a shared module).

Intl comes with PHP installation by default on DA servers, however, it's also available as a pecl extension, so, it wouldn't require a recompilation of PHP if DA didn't have it there by default. PHP has a large library of extensions that could be installed from pecl. Just a FYI :)
 
As for PHP it's worth mentioning, whenever you use CloudLinux with DirectAdmin you can install alt-php-* with RPMs with all other required packages.

Potentially you can install all services from RPM, you will still need to make sure the installed binaries read configs from the places where DirectAdmin put them. FreeBSD administrators here have experience in this area, as they install packages, so called ports from FreeBSD repositories with configs from DirectAdmin.

I believe this will be handy if you want to give it a try: https://directadmin.com/paths.html
 
Back
Top