Results 1 to 15 of 15

Thread: migrate directadmin into freebsds services (exim etc)

  1. #1
    Join Date
    Sep 2006
    Location
    Larisa, Greece
    Posts
    236

    migrate directadmin into freebsds ports (exim etc)

    The file with the instructions is moved here...

    **** EDITED ******************************************************
    Hi, unfortunately i dont have time to put it all together, but i'm posting some notes attached for how i did my migration to ports.
    There may be some mistakes (some of the notes added after some months of the real test), so try it and post any problems to check it out.
    Don't try if possible in a production server, i hope that someone who has the time to test it will post back a 100% working directions.
    It's running on freebsd 6.3 and (6.2) 32bit but i thing that it can be used for 7.0
    Be sure to replace some root@servername.domain.com with your domain name..

    Paix i hope that you can edit it and test it for 7.0 64bit ..

    Before changing anything take a backup!
    ********************************************************************

    Hi,
    i have just managed to make my directadmin independent from its custom build services.
    Unfortunately i cant write an extensive how to as many hours and attempts needed to make it work.
    I can say though that it can be done. I have disabled all of DA's services and use freebsd's default services.. now i can freely portupgrade and follow security updates for apache, exim etc and follow freebsd's update tree.
    The idea came from DA's how to upgrade mysql for freebsd.

    As a rule, the standard procedure was :
    1. install the service (cd /usr/ports/www/apache20) and when possible complile it with flags that DA uses.
    2. cd to /usr/local/etc/apache, delete the folder and make a link to DA's config (/etc/httpd/conf)
    3. delete DA's service files (/usr/local/bin/httpd) so the system use /usr/local/sbin/httpd)
    4. set some flags to /etc/rc.conf to match DA's prefs and enable the service
    5. sometimes have some links from DA's services to freebsd services like ln /usr/local/sbin/httpd /usr/local/bin/httpd
    6. delete DA's startup files and let the system use its own.
    7. start the service and see the logs for what you have forgotten

    Dont try to move all of the services by one, for example change spamassasin, wait for some days to see that the system goes ok, change exim and wait some days, then proftp etc..

    proftpd is the simpler service along with mysql
    then you can try spamassassin (this needs the links from the old executables as exim uses them by absolute path) etc...

    In the end if something doesnt work you can pkg_delete it and use DA's custom build script to reinstall it and go from scratch.

    I'm willing to help anyone who try's some of the above, i will watch this thread (cant every day due to military obligations for some months)..


    ************************************************************************************************
    Attached Files Attached Files
    Last edited by tsiou; 03-17-2009 at 02:21 AM.

  2. #2
    Join Date
    Aug 2007
    Posts
    13

    Thanks

    I see some one goes the same way.
    Actually, FreeBSD is a stable system, and Linux - a set of varios software runing on kernel with many variation. So compile everything for linux by hands or setup.sh is a good idea. FreeBSD is operation system, and can manage/update software by itself. I hope one day directadmin can do installation via ports collection.

  3. #3
    Join Date
    Feb 2007
    Posts
    51
    Me too! DA devs -- please consider letting FreeBSD ports take care of the services for a future release. It seems such a shame to have the bulk of my services not under the beautiful FreeBSD ports system. I can use FreeBSD, but I can't use one of its greatest features: the ports package system.

  4. #4
    Join Date
    Sep 2006
    Posts
    795
    Last edited by pucky; 08-24-2007 at 04:54 PM.

  5. #5
    Join Date
    Oct 2007
    Posts
    12
    Code:
    serv# more /usr/local/directadmin/data/admin/services.status
    directadmin=ON
    exim-4.68-0=ON
    httpd=ON
    mysqld=ON
    named=ON
    proftpd=ON
    sshd=ON
    serv#
    and status exim works.

  6. #6
    Join Date
    Sep 2006
    Location
    Larisa, Greece
    Posts
    236
    ***** ADDED TO txt, no need to read it******

    Some notes when upgrading/installing ports :

    1. exim
    you should cd /usr/ports/mail/exim, edit the makefile and replace
    EXIM_USER?= mailnull
    with
    EXIM_USER?= mail
    to use DA's owner in files/directories
    and then
    make deinstall reinstall


    **** Added also
    2. apache
    you should cd /usr/ports/www/apache20, and run
    make WITH_SUEXEC_MODULES=1 deinstall reinstall
    to have the needed suexec module
    Last edited by tsiou; 02-25-2009 at 08:47 AM.

  7. #7
    Join Date
    Jan 2006
    Posts
    57
    Quote Originally Posted by tsiou View Post
    Some notes when upgrading/installing ports :

    1. exim
    you should cd /usr/ports/mail/exim, edit the makefile and replace
    EXIM_USER?= mailnull
    with
    EXIM_USER?= mail
    to use DA's owner in files/directories
    and then
    make deinstall reinstall

    2. apache
    you should cd /usr/ports/www/apache20, and run
    make WITH_SUEXEC_MODULES=1 deinstall reinstall
    to have the needed suexec module
    you should cd /usr/ports/mail/exim, edit the makefile and replace
    EXIM_USER?= mailnull
    with
    EXIM_USER?= mail
    ANd Remeber to chage it everytime exim is upgraded in ports.

  8. #8
    Join Date
    Sep 2006
    Location
    Larisa, Greece
    Posts
    236
    ***** ADDED TO txt, no need to read it******

    For apache and mysql you can edit /usr/local/etc/pkgtools.conf, search for :
    MAKE_ARGS = {

    and make it like :

    MAKE_ARGS = {
    'databases/mysql50-server' => 'WITH_LINUXTHREADS=1',
    'www/apache20' => 'WITH_SUEXEC_MODULES=1',
    }

    so at every portupgrade you dont need to deinstall reinstall.
    For mysql it compiles it with linux threads support (it's not needed but you can use it for better perfomance)

    If anyone can find out how we can use a way like it to avoid editing exim's Makefile before every upgrafe to replace mail with mailnul user, then the system is complete..

    ############## EDITED TO POST SOLUTION ###################
    Many thanks to paix that solved that too :
    edit exim.conf and add :

    exim_user = mail
    exim_group = mail
    Last edited by tsiou; 12-16-2008 at 07:08 AM.
    always RTFM at the end.

  9. #9
    Join Date
    Sep 2006
    Location
    Larisa, Greece
    Posts
    236
    ***** ADDED TO txt, no need to read it******

    Hi, unfortunately i dont have time to put it all together, but i'm posting some notes attached for how i did my migration to ports.
    There may be some mistakes (some of the notes added after some months of the real test), so try it and post any problems to check it out.
    Don't try if possible in a production server, i hope that someone who has the time to test it will post back a 100% working directions.
    It's running on freebsd 6.3 and (6.2) 32bit but i thing that it can be used for 7.0
    Be sure to replace some root@servername.domain.com with your domain name..

    Paix i hope that you can edit it and test it for 7.0 64bit ..

    Before changing anything take a backup!

    ####### HOWTO.TXT IS UPDATED IN TIME TO TIME SO DOWNLOAD THE LATEST VERSION OR READ THE ENTIRE POSTS
    Last edited by tsiou; 12-16-2008 at 07:09 AM.
    always RTFM at the end.

  10. #10
    Join Date
    Oct 2006
    Posts
    34
    I will be trying this in the near future on FreeBSD 6.2 . Will keep you posted on how it goes!

  11. #11
    Join Date
    Sep 2006
    Location
    Larisa, Greece
    Posts
    236
    Quote Originally Posted by S25 View Post
    I will be trying this in the near future on FreeBSD 6.2 . Will keep you posted on how it goes!
    And maybe keep some notes to edit my file and post a 100% working setup.
    always RTFM at the end.

  12. #12
    Join Date
    Oct 2006
    Posts
    34
    Sure! Assuming I get it working !

  13. #13
    Join Date
    Jan 2006
    Posts
    223
    I used your tutorial to switch only Apache and PHP to the ports versions and all seems to be working seamlessly. The only thing i did differently was install apache 2.2 rather than 2.0.
    It took -ages- (almost an hour) to build everything in the php5-extensions package and in hindsight i could have done without a lot of extensions but never mind. I now have the benefit of allowing for portupgrade to keep Apache and PHP up to date... much better!

    One thing i will say is that it seems as though the howto.txt is ordered wrongly, I wouldn't recommend installing mod_security and mod_evasive from ports before you have sorted out configuring and integrating php from ports.

    One more thing -- remember to restart MySQL after upgrading apache and PHP to stop it causing high loads.

    EDIT: This post should be placed in the How-To Guides section as well.
    EDIT2: I used FreeBSD 7.1-Release for this howto and, other than using apache22, followed the howto exactly
    Last edited by Rich-Boy; 02-28-2009 at 06:01 AM.

  14. #14
    Join Date
    Sep 2006
    Location
    Larisa, Greece
    Posts
    236
    Quote Originally Posted by Rich-Boy View Post
    One thing i will say is that it seems as though the howto.txt is ordered wrongly, I wouldn't recommend installing mod_security and mod_evasive from ports before you have sorted out configuring and integrating php from ports.

    EDIT: This post should be placed in the How-To Guides section as well.
    Yes you're right.. I 've changed the order...

    Also i added (as i can remember) zend installation and a section that says about pkgtools.conf
    (in apache22 it may not cause any problems as it may have suexec enabled by default)


    The how to is written many months later than the real installations .
    Some things may be missing. I hope that someone with
    a new server to follow my guide, add his comments, see where my how to is wrong and post a real how to .
    Unfortunately i dont have a spare server to reinstall or the time needed ( i have the time to help somenone by advice though)....

    If you 're starting now, take notes step by step, i can help you anytime by email for any problems, and make a how to that works 100% and then post it to the how to's section....

    If someone is willing to do this, we can ask from DA support to open a section in the freebsd forum to discuss there for updates probles etc...

    I think that if there were a 100% working how to many freebsd users would follow it.
    For a year and a half ago that i started i only do a pkg_version -v |grep needs and portupgrade xxxxxx
    Last edited by tsiou; 02-25-2009 at 08:46 AM.
    always RTFM at the end.

  15. #15
    Join Date
    Dec 2010
    Posts
    1
    thnaks for the information buddy well it true ...
    at every portupgrade you dont need to deinstall reinstall.
    For mysql it compiles it with linux threads support (it's not needed but you can use it for better perfomance)

Similar Threads

  1. How to Migrate Directadmin from Apache to Nginx
    By itsmehanoop in forum DirectAdmin General Discussion
    Replies: 1
    Last Post: 08-27-2012, 07:57 AM
  2. Server Migrate whit DIRECTADMIN
    By omarrios in forum Admin-Level Difficulties
    Replies: 2
    Last Post: 12-22-2010, 12:05 PM
  3. Replies: 3
    Last Post: 03-27-2008, 11:03 PM
  4. Migrate Postfix to Exim
    By _sander_ in forum E-Mail
    Replies: 1
    Last Post: 03-21-2008, 08:43 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •