Definitive answert to using ports with DA

thoroughfare

Verified User
Joined
Aug 11, 2003
Messages
575
Hi,

I'd like a definitive answer from DA on how to use ports with DA.

1. I'd like to know exactly which packages have been modified by DA (e.g. da_exim), and how they're updated - or do we have to watch the forums to know when they need updating? It'd be great if the admin panel could give us notification of a new da_* version being available.

2. Regarding ports - I ran portupgrade on my new FreeBSD box and it's broken exim and apache. I'm working through this but I need an explanation of what to upgrade and what not to upgrade using the ports system. It'd be nice if DA would integrate better with the ports.

It's quite confusing - for example, I thought DA installed a da_exim packages, but I get this:

[root@server root]pkg_info | grep exim
exim-4.42-1 exim 4.42 mail server

^^ Is that the DA package I presume?

There's also:
gd-2.0.33_1,1 A graphics library for fast creation of images

...but I thought that was updated using DA's custom apache system?

Any help is much appreciated :)
Many thanks,
Matt :)
 
PS... Perhaps if DA ran their own CVS server for FreeBSD ports, they could make DA and all its packages into ports and merge them with the ports tree - so we could cvsup from the DA server and DirectAdmin would be just like any other port?

Or is it only open source software that can be made into ports? Can the ports system install binaries?

Matt
 
Matt,

You should probably presume that anything DA installs from either source or from customized packages is probably customized by DA.

Presuming anything else could be dangerous.

Jeff
 
You should probably presume that anything DA installs from either source or from customized packages is probably customized by DA.

Well, yes I'd say that's obvious. What I'd like to know is exactly which packages are customised and in what way.

Part of the confusion is the fact that exim is installed on my box as a port, but yet I thought DA had rolled their own Exim releases. Apart from using portupgrade, I've never directly installed the exim port on my box.

The problem is really that DA doesn't integrate with the ports system which makes things a little more complex when updating. For example, MySQL isn't installed using the ports system when you install DA (it's installed from source I do believe), but I can't see the reason for that (since DA don't customise MySQL?).

Matt
 
thoroughfare said:
Well, yes I'd say that's obvious. What I'd like to know is exactly which packages are customised and in what way.
That's a great idea, but in practice it falls short.

Why? Because the DA staff may later customize something they don't customize now, or vice-versa.

Almost twenty-five years of doing and teaching systems analysis has taught me that "When you assume anything you make an ass out of u and me".
The problem is really that DA doesn't integrate with the ports system which makes things a little more complex when updating. For example, MySQL isn't installed using the ports system when you install DA (it's installed from source I do believe), but I can't see the reason for that (since DA don't customise MySQL?).
As I've written elsewhere before, my presumption is that DA was originally designed for RedHat Linux, and other DA ports are basically ports of that model.

Jeff
 
Why? Because the DA staff may later customize something they don't customize now, or vice-versa.

Almost twenty-five years of doing and teaching systems analysis has taught me that "When you assume anything you make an ass out of u and me".

I don't see where the making assumptions part fits in with this?

I would think that your years of experience would have taught you that good documentation is the key to scalability and reliability? If DA document their customisations, it'd be nice. But that's not my major gripe anyway.

I'm most interested in a response from DA about the exim port I found in pkg_info, and a concise guide to which DA packages don't use the ports system (if any use it all all).

I'd really love to see DA run a CVS server for FreeBSD ports, with the DA packages already merged into the CVS ports tree.

As I've written elsewhere before, my presumption is that DA was originally designed for RedHat Linux, and other DA ports are basically ports of that model.

I'd agree that's probably the case, but that doesn't mean that their releases for other OSes should be any less efficient than their RedHat releases.

Matt
 
exim is a package not a port, so when directadmin releases an update it is updated using pkg_delete then pkg_add for the new package, and when you run portupgrade it is skipped. So I am not sure how you managed to break exim when you ran portupgrade. Now with apache it is done direct from src inside /usr/local/directadmin/customapache so it isnt even detected by portupgrade so as such should not be affected, the same goes for mysql.

You can of course decide to use ports, like I have done for mysql but you will probably need to modify how they are installed so they remain compatible with directadmin eg. I had to tell mysql to use /usr/local/mysql/data as the db dir rather then the default of /var/db/mysql, and rename the rc.d script created by the port to the name DA uses to restart the daemon.
 
Thanks Chrysalis, that's useful to know.

Turned out I broke Exim by setting my /var/log permissions too high (I was hardening my box and went a little OTT on permissions), and I broke Apache because I was using 'use.perl port' which causes the Perl port to be used rather than the base system version of Perl.

When I rebuilt Apache, I found a warning during the compile:

PHP:
************* WARNING *************
                                                                                                                               
  Your current configuration will most likely trigger core dumps, suggestions:
   *) Do not configure mod_perl as a DSO
   *) Rebuild Perl without malloc pollution (Configure -Ubincompat5005)
                                                                                                                               
                                                                                                                               
************* WARNING *************

So I rebuilt the Perl port with -Ubincompat5005 (had to edit the Makefile manually), rebuilt Apache (and everything else in the customapache build system) and it worked :-D

Thanks for the info about DA using packages rather than ports, I don't think I'd realised there was a major difference. I'll research that further.

I'd be interested to hear more about installing MySQL as a port - is that all that was required to make it compatible?

Many thanks!
Matt :)
 
ok with apache and perl ports you can use the upgraded perl from ports but the mistake your probably made was not rebuilding all your perl modules after you upgraded perl.
 
I think it was also due to some difference between the system Perl and the ports Perl, as the recompile fixed the problem.

I haven't recompiled the Perl modules however - how do I do that?

Thanks,
Matt :)
 
you need to tell portupgrade to upgrade all ports that depend on perl, I forgot the magic command for that but wil search for you. If you have any perl modules installed not via the ports system then simply recompile them manually, if you have ran use.perl port then they will bind to the new perl automatically.
 
Perl

From /usr/ports/UPDATING:

* run some magic incantations to upgrade all ports depending on perl,
that is run something like :
portupgrade -f `(pkg_info -R perl-5\* |tail +4; \
find /usr/local/lib/perl5/site_perl/5.[68].[1245] -type f -print0 \
| xargs -0 pkg_which -fv | sed -e '/: ?/d' -e 's/.*: //')|sort -u`
This is likely to fail for a few ports, you'll have to upgrade them
afterwards by hand.
 
As some of you know I am still in the lurking/learning phase with DA. I am going to be setting up a server using it and FreeBSD (probably with for 5.4).

Maybe some of you can shed some light on a couple things for me.

DA seems to have a custom apache script that builds everything not just apache but mysql etc or so it seems from reading posts. How much of this is done by compiling source? Are some apps compiled and others installed like a package?

For the apps compiled from source can we still specify compile options such as cflags etc. MySQL has several options that it recommends using and I like to build it static etc. but it has some that I do not want to use for apache so there needs to be a way to specify these per app.

do the compile scripts use standard make ... commands so that we can edit the /etc/make.conf with blanket options for everything?

It is a shame that DA does not use the standard directory layouts for the apps for the OS or even the standard init script names.

Being able to use ports would be great but if we can do much the same thing with DA's scripts that is fine. I would hate to not have any control over the build process though. That is one of the things I love about FreeBSD. Once you get used to the ports or compiling your own apps it is hard to give up that control.
 
MySQL is only installed during DirectAdmin's installation using binaries that DirectAdmin made. Customapache doesn't maintain it. For a list of programs that customapache maintains, search the forums for the thread on it or when executing build don't give it any arguments/options.

You can modify as much of customapache as you want, you just have to keep in mind though that some modifications might be overwritten when you run ./build update
 
For FreeBSD it uses a combination, it installs some ports such as perl and wget and some source like eveything in customapache.

The problem is the way I see it is with mysql, directadmin is installing mysql 4.0.17 a very old version in a non standard location, I tend to switch to using the port on all my freebsd servers but you have to remember to change the rc.d script and the database location so it uses the old databases. on FreeBSD 5.3 Directadmin also actually downgrades perl from the one shipped with the os.

I did email john about this but so far have had no reply :( I am hoping he didnt just blow my email off because the method I suggested to him would keep the right version of perl and use the ports version of mysql during the install and be version 4.0.24.

For all the customapache stuff php and apache can be configured easily by editing configure.php and configure.apache_ssl.
 
I don't understand. The point with ports is that you can maintain your own [small] repository in for example /usr/da_ports.

The only thing a port does is download [the same] source, extract it, compare it to a md5sum, patch it eventually [so Direct Admin can do the customization right there] and then ./configure; make; make install and eventually a pkg-message [message for the user] and post-install.

However, there are consensus to have third party software in /usr/local; binaries in /usr/local/bin and configs in /usr/local/etc/some_program/*.sample to keep the system clean. It's higly recommended to keep it that way IMHO.
 
Last edited:
I have been hanging around watching and learning and I have to say I like DA. I am not sure I am going to use it yet though. I have the impression that running it with FreeBSD may be a pain. It seems that it is not as supported as well as Linux and does not take advantage of the native OS features fully.

It seems it is very close but is missing the mark. For some reason my non programmer mind can not understand I guess. I don't get why it is setup the way it is, not following directory structures layed out by the OS etc. Why would you do that? It makes it such a pain to deal with especially when updates are not put out quickly and we have to work around this strangeness to keep up to date.

The company seems taxed right now to keep up and maybe after a little while we be able to hire more help. Then maybe at least the apps for FreeBSD will be kept current.

Please notice there are many "my impression" statements in all this. I will continue to watch and see how things play out. I do hope for the better!
 
I don't think you understand what has been said. FreeBSD is rocksolid and so is DA. Creating /usr/da_ports should be a nice thing to do IMHO. That said, DA is the best control panel I know and I trust FreeBSD much more than I trust Linux.
 
Last edited:
Back
Top