HOWTO (In Developing): DA Installing on FreeBSD 7.0 64-bit (Using ports tree)

PGP

Verified User
Joined
Nov 7, 2006
Messages
37
Location
Russia
HOWTO (Done! In testing now): DA Installing on FreeBSD 7.0 64-bit AMD64

Hello to all, I just wanna try to make a step-by-step HOW-TO about Installing DA on FreeBSD 7.0 64-bit using all services from FreeBSD ports system.

So, you have already installed OS FreeBSD 7.0 64-bit.
The main condition is that FreeBSD must be compilied with 32-bit support (if you didn't change anything in kernel - 32-bit support is enabled)
NOTE: You also have to compile new kernel with quotas support, cause by default quotas not compilied into kernel.

So, let's begin:
  1. Add your user to SSH allowed users:
    Code:
    # ee /etc/ssh/sshd_config
    Add at the end of file following string:
    Code:
    AllowUsers username
    Where 'username' - login of your user.
    IMPORTANT, don't forget to enter an empty string after string you entered, or after DA install you cannot login over SSH, because it will looks something like this
    Code:
    [COLOR=RED][B][I]/*WRONG configuration in case you didnt insert an empty string*/[/I][/B]
    AllowUsers usernameAllowUsers admin 
    AllowUsers root[/COLOR]
  2. Required software (needed for Directadmin):
    Code:
    # make install clean -C /usr/ports/devel/libtool15
    # make install clean -C /usr/ports/devel/autoconf262
    # make install clean -C /usr/ports/devel/automake110
    # make install clean -C /usr/ports/ftp/wget
    # make install clean -C /usr/ports/print/freetype
    # make install clean -C /usr/ports/print/freetype2
    # make install clean -C /usr/ports/graphics/ImageMagick
    # make install clean -C /usr/ports/graphics/gd
    # make install clean -C /usr/ports/textproc/libxslt
    # make install clean -C /usr/ports/ftp/curl
    # make install clean -C /usr/ports/devel/gmake
  3. Optional software:
    Midnight Commander (mc) - a free Norton Commander Clone.
    Code:
    # make install clean -C /usr/ports/misc/mc
  4. DA Installing (WARNING! csh must not be set for root and your 'wheel' user. Or you will lose access for your server):
    Code:
    # ./setup.sh
    
    Please enter your Client ID : ****
    Please enter your License ID : *****
    Please enter your hostname \(server.domain.com\)
    It must be a Fully Qualified Domain Name
    Do *not* use a domain you plan on using for the hostname:
    eg. don't use domain.com. Use server.domain.com instead.
    Do not enter http:// or www
    
    Enter your hostname (FQDN) : ***.***.***
    Client ID:  ****
    License ID: *****
    Hostname: ***.***.***
    Is this correct? (y,n) : y
    The following ethernet devices were found. Please enter the name of the one you wish to use:
    
    em0 em1
    
    Enter the device name: em0
    Using em0
    Using AA.BB.CC.DD
    Is AA.BB.CC.DD the IP in your license? (y,n) : y
    
    DirectAdmin will now be installed on: FreeBSD 7.0
    Is this correct? (must match license) (y,n) : y
    
    You now have 2 options for your apache/php setup.
    
    1: customapache: older, more tested. Includes Apache 1.3, php 4 and frontpage.
    2: custombuild 1.1:  newer, less tested. Includes any Apache version, php 4, 5, or both in cli and/or suphp. Frontpage not available.
                     Post any issues with custombuild to the forum: http://www.directadmin.com/forum/forumdisplay.php?f=61
    
    Enter your choice (1 or 2): 2
    You have chosen custombuild 1.1.
    
    Would you like the default settings of apache 2.2 and php 5 cli? (y/n): n
    You have chosen to customize the custombuild options.  Please wait while options configurator is downloaded...
    
    /usr/local/directadmin/custombuild/options    100% of   11 kB   22 MBps
    Do you want to have PHP4 or PHP5 as default? (4/5): 5
    Do you want to have PHP5? (yes/no): yes
    Do you want to have PHP5 as CLI or CGI? (cli/cgi): cgi
    Do you want to have PHP4? (yes/no): no
    Do you want to have the php.ini (PHP configuration file) rewritten? (yes/no): yes
    For the next question, the usual file is the dist (distribution) version. What type of php.ini (PHP configuration file) do you want to have? (dist/recommended): recommended
    Do you want to have Zend Optimizer? (yes/no): no
    Do you want to be able to update/instal MySQL using CustomBuild? (yes/no): no
    Do you want CustomBuild to backup MySQL databases before the update? (yes/no): no
    Which version of Apache do you want to have? (1.3/2.0/2.2): 2.2
    Do you want to be able to install/update phpMyAdmin using CustomBuild? (yes/no): yes
    Do you want to be able to install/update Atmail webmail using CustomBuild? (yes/no): yes
    Do you want to be able to install/update SquirrelMail webmail using CustomBuild? (yes/no): yes
    Do you want to be able to install/update RoundCube webmail using CustomBuild? (yes/no): yes
    Do you want to be able to install/update UebiMiau webmail using CustomBuild? (yes/no): yes
    Do you want to install PHP mail() header patch together with PHP? (yes/no): yes
    Do you want to install Dovecot? (yes/no): yes
    Do you want to be able to update Exim configuration file (exim.conf) using CustomBuild? (yes/no): yes
    Do you want to be able to install/update ProFTPD using CustomBuild? (yes/no): no
    Do you want CustomBuild to install Jailed shell (beta)? (yes/no): no
    Do you want CustomBuild to download versions.txt every time? (yes/no): yes
    Do you want to enable bolded text? (yes/no): yes
    Do you want to clean everything (run './build clean' every time) running CustomBuild? (yes/no): no
    Which fileserver do you want to use (1 is located in USA, 2 - Europe)? (1/2): 2
    Options.conf has been installed successfully
  5. Reinstalling of libiconv, because during DA install it was rewrited to 32-bit.
    Code:
    # make deinstall reinstall clean -C /usr/ports/converters/libiconv
  6. MySQL Installing from ports:
    Code:
    # rm /usr/local/mysql
    # rm /usr/local/bin/mysql
    # rm /usr/local/bin/mysqladmin
    # make install clean -C /usr/ports/databases/mysql51-server/
    
    Add mysql_enabled="YES" to /etc/rc.conf
    
    # ln -s /home/mysql /var/db/mysql
    # cp /etc/my.cnf /home/mysql
    # chown -R mysql:mysql /home/mysql/*
    # cd /usr/local/etc/rc.d
    # mv mysqld mysqld_da_old
    # ln -s mysql-server mysqld
    # /usr/local/etc/rc.d/mysqld start
    # ln -s /usr/local /usr/local/mysql
    Adding DA root prevelegies to MySQL.
    Code:
    # mysql -uroot -p
    mysql> GRANT ALL PRIVILEGES ON *.* TO da_admin@localhost IDENTIFIED BY 'password' WITH GRANT OPTION;
    mysql> FLUSH PRIVILEGES;
    mysql> quit
  7. Installing proftpd
    Code:
    # make install clean -C /usr/ports/ftp/proftpd
    
    Add proftpd_enable="YES" to /etc/rc.conf
    
    # mv /usr/local/etc/proftpd.conf /usr/local/etc/proftpd_orig_conf
    # ln -s /etc/proftpd.conf /usr/local/etc/proftpd.conf
  8. Installing suPHP, php5-cgi, dovecot
    Code:
    # cd /usr/local/directadmin/custombuild
    # ./build suphp
    
    The ~username (UserDir) method will fail in paranoid mode, 
    but if you need that - check this http://help.directadmin.com/item.php?id=176
    
    # ./build php n
    # ./build php5-cgi n
    # ./build dovecot
    # ./build exim_conf
    # ./build phpmyadmin
  9. Additionally if you installing suPHP in 'paranoid' mode, you may want to add in directadmin.conf this string:
    Code:
    apache_public_html=0
    For more information see http://www.directadmin.com/features.php?id=497

  10. Installing exim from ports
    Code:
    # make install clean -C /usr/ports/mail/exim
    
    Add to /etc/rc.conf
    
    sendmail_enable="NO"
    sendmail_submit_enable="NO"
    sendmail_outbound_enable="NO"
    sendmail_msp_queue_enable="NO"
    exim_enable="YES" 
    
    # cd /usr/local/etc/exim/
    # mv configure configure_orig_old
    # ln -s /etc/exim.conf configure
    
    Edit file /usr/local/directadmin/data/admin/services.status, be sure to have:
    
    exim-4.69-0=ON
    
    # cd /usr/local/etc/rc.d/
    
    Edit /usr/local/etc/rc.d/boot.sh, remove any exim lines
    
    # ln -s exim exim-4.69-0
    # /usr/local/etc/rc.d/exim restart
    # tail /var/log/exim/mainlog
    # tail /var/log/exim/paniclog
  11. Zend Optimizer Installing
    Code:
    # pkg_add -r ZendOptimizer
    
    Add to /usr/local/etc/php5/cgi/php.ini these strings:
    
    [Zend]
    zend_optimizer.optimization_level=14
    zend_extension_manager.optimizer="/usr/local/lib/php/20060613/Optimizer"
    zend_extension_manager.optimizer_ts="/usr/local/lib/php/20060613/Optimizer_TS"
    zend_extension="/usr/local/lib/php/20060613/ZendExtensionManager.so"
    zend_extension_ts="/usr/local/lib/php/20060613/ZendExtensionManager_TS.so"
    
    [B][COLOR=RED]*BE SURE* that zend_optimizer.optimization_level=14, because by default it 15 and doesnt work.[/COLOR][/B]
Notes:
If there is an error starting httpd: Syntax error on line 30 of /usr/local/directadmin/data/users/dicky/httpd.conf:
Invalid command 'php_admin_flag', perhaps misspelled or defined by a module not included in the server configuration

You may want to use this commnd
Code:
# cd /usr/local/directadmin/custombuild && ./build rewrite_confs
If some permissons troubles with directadmin directories, you may try to:
Code:
# cd /usr/local/directadmin/scripts && ./set_permissions.sh all

So, that's my version of installing DA on FreeBSD 7.0 64-bit...

Your comments and corrections are strongly desired =) Lets make this HOW-TO together.

-------------------------------
Thanx to chatwizrd, paix
Updated...
 
Last edited:
You should change cvsup to cvsup-without-gui

using cvsup is old day.
Try csup instead, which come with base system.

Also if you installing all software from ports, install mc from ports tree too.

Also I recommended to group the list of installed software.
For example..
Code:
make install clean -C /usr/ports/devel/libtool15
make install clean -C /usr/ports/devel/autoconf262
...
it's more simple.

Next, never use webmin for server maintain !!!! And don't recommend it in the howto! It's not necessary part of DA, and freebsd too.
If someone need webmin for some reason, he could install webmin himself.

PS. Thanks for starting this howto! :)
 
So how does csup work? Does it use the same sort of files as cvsup?
 
So, i've managed to install DA on FreeBSD 7.0 AMD64.
Of course not everything is installed, and not everything installed from ports, but IT WORKS =)
One of troubles was installing of Zend Optimizer.

So... Waiting for your comments. :)
1st post will be updated in nearest future...
 
Last edited:
I wish this tutorial had have around a month ago for me to try but it's too late now :/
Thanks for the tutorial anyway it looks pretty seemless to me.
 
portinstall seems to be good enough to use.
Comes with portupgrade (/usr/ports/ports-mgmt/portupgrade)
 
I am wondering if this is going to be a workable solution long term? The two bad thoughts running through my head are

1. DirectAdmin will never support 64 bit FreeBSD and something that changes in the future of the core DA will make this hack unusable.

2. DirectAdmin decides to support 64 bit FreeBSD but does it in a different way than this which makes this unusable.

I would love migrate everything to 64 bit 7.0 but the main reason we use DirectAdmin is the ease of use and stability.

I'm not really saying anything important here. Mostly just raising my hand to say that I'm another person wishing DA supported this.
 
Hello,

1) Will will be supporting FreeBSD 7, 64-bit shortly. We've got the new 64-bit racks here now and will likely start development sometime this week. As for this particular setup, I cannot say for sure... it depends how you upgrade things. The directadmin binaries, if they work, should be fine to update normally.

2) Once we get all the scripts and binaries working, then you can likely reinstall overtop of what you have.. or just update the bits and pieces to our versions to become "standard", so converting from this version to our version isn't likely too hard to do.

John
 
That is great news.

Now if you can include the archive database type in the mysql binary, you will make my year!
 
Hello,

1) Will will be supporting FreeBSD 7, 64-bit shortly. We've got the new 64-bit racks here now and will likely start development sometime this week. As for this particular setup, I cannot say for sure... it depends how you upgrade things. The directadmin binaries, if they work, should be fine to update normally.

2) Once we get all the scripts and binaries working, then you can likely reinstall overtop of what you have.. or just update the bits and pieces to our versions to become "standard", so converting from this version to our version isn't likely too hard to do.

John


OMG JUMPS FOR JOY!

I know there isn't an exact date but any ETA on a beta? I would be happy to beta test this. I have a box with 7.0 amd-64bit installed just waiting for me to try getting DA running on it. Make me a ginea pig and all I ask for in exchange is a discount on a lifetime license. I am DYING to get this even in buggy beta format.
 
Hello,

1) Will will be supporting FreeBSD 7, 64-bit shortly. We've got the new 64-bit racks here now and will likely start development sometime this week. As for this particular setup, I cannot say for sure... it depends how you upgrade things. The directadmin binaries, if they work, should be fine to update normally.

John

That's a very good news :)
 
Just curious if there was a guesstimate on when this will be ready? Thanks!
 
Just curious if there was a guesstimate on when this will be ready? Thanks!

Yes and is there a beta testing program one can take part in? I would really like to place a box up and have it undergo the beta testing.
 
Is exim running for your setup?
Because i 've noticed that DA's default permissions for exim is
mail:mail
Freebsd installs exim with mailnul:mail
If you install from ports, exim wouldn't be able to read log files spool directory etc.
When i upgrade exim i edit it's Makefile and set user=mail before portupgrade.
I don't see any of that in your setup. Did you change the directory and file owner?
 
Is exim running for your setup?
Because i 've noticed that DA's default permissions for exim is
mail:mail
Freebsd installs exim with mailnul:mail
If you install from ports, exim wouldn't be able to read log files spool directory etc.
When i upgrade exim i edit it's Makefile and set user=mail before portupgrade.
I don't see any of that in your setup. Did you change the directory and file owner?

Yes, you are right default is mailnull:mail
You should just specify the right user\group in exim.conf

Code:
exim_user = mail
exim_group = mail

Be sure that you also have mail:mail user and group in /etc/newsyslog.conf
 
Back
Top