How To install DA on FreeBSD 64 7.x, with no hacks required

IT_Architect

Verified User
Joined
Feb 27, 2006
Messages
1,114
How To install DA on FreeBSD 64 7.x, with no hacks required.

As of this date, this procedure will produce a solid no-error installation. The # represents a command prompt and you should just need to copy and paste those commands into your terminal window. Once you stat the script, you can walk away and come back to a perfect FreeBSD 64 DA install.

1. The FreeBSD install: Start with a clean kernel developer install of FreeBSD 7.x. The kernel developer options imply gives you what you need to add quotas to the kernel without all of the other fu-fu that isn't typically used on a web server. Do not install ANYTHING from ports.

2. rc.conf config: FreeBSD installs sendmail with the OS. It installs with lines commented out in the /etc/rc.conf for disabling it. Uncomment those lines to prevent sendmail from loading at boot time.

3. Set up the prerequisites:
- Navigate to a directory where you want to store source files:
# mkdir directadmin
# mkdir wget
Comment: Do NOT be tempted to install wget from ports. wget from ports pulls perl and friends and you will end up needing symlinks or partial reinstall to get things working. Also, you do need to install wget ahead of time for the install to work.
# cd wget
# fetch http://files.directadmin.com/services/wget-1.8.2.tar.gz
# tar xvzf wget-1.8.2.tar.gz
# cd wget-1.8.2
# ./configure --prefix=/usr/local --with-ssl
# make
# make install

# cd ../../directadmin

- Get and install DA:
# fetch <url given for DirectAdmin install>
# chmod 755 setup.sh

4. Start the install:
# ./setup.sh

Screen Output:
perl: not found
perl: not found
*** 64-bit OS ***
*** that being said, this should be a FreeBSD 7 system. ***
Please enter your Client ID : XXXXXX
Please enter your License ID : XXXXXX
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) : server1.mydomain.com
Client ID: XXXXXX
License ID: XXXXXX
Hostname: server1.mydomain.com
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 plip0

Enter the device name: em1
Using em1
Using XXX.XXX.XXX.XXX
Is XXX.XXX.XXX.XXX the IP in your license? (y,n) : y

Comment: I do not know all of the Custombuild options do and don't work with FreeBSD 64. I didn't do Zend with Custombuild and I can tell you from experience that MySQL 5.1 will not work. There are some advantages to MySQL 5.1, and if you want it enough, Prodiac came up with a solution on thread http://directadmin.com/forum/showthread.php?p=153972#post153972, but it is manual. It would be nice if that were incorporated into the DA install. If you go with Apache 2.2, MySQL 5.0 and CLI, you might just as well take the defaults rather than specifying each item.

DirectAdmin will now be installed on: FreeBSD 7.2
Is this correct? (must match license) (y,n) : y

You now have 2 options for your apache/php setup.

1: customapache: older software. Includes Apache 1.3, php 4 and frontpage.
2: custombuild 1.1: newer software (recommended). 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): y
(Come back in 30 minutes)

Comment: When if finishes, capture the screen output for later reference

5. After install script finishes
- The first thing it says to do on the results screen is to restart httpd. DO NOT. The system is not ready for that yet.
# echo accf_http_load=”YES”>>/boot/loader.conf
# kldload accf_http
# /usr/local/etc/rc.d/httpd restart
- It should now restart clean.
- There may have been some carnage caused by this and other things so you'll want to reboot to see how the server will really come back.
# shutdown -r now
- When it reboots there will be one error. It says:
named[932]: the working directory is not writable
Ignore that spurious error.
- Log into the control panel with the password from the captured output of the last screen of the install.
- Click on Service Monitor and make sure all of the services are running.

Things that keep me humble:
- On one install, I ran into my old exim nemisis. If exim is not running after the install, ssh in and run this from the command line:
# /usr/local/etc/rc.d/exim start
If it come back saying it is looking for libperl.so, there are at least a couple ways to fix this. One way is by using a symlink:
ln -s /usr/local/lib/perl5/5.8.9/mach/CORE/libperl.so /usr/local/lib
or the way recommended to me by DA, re-install exim. I'm not convinced that the symlink isn't the better approach if DA installs and updates will create the same problem each time. On the other hand if they do fix that then the symlink is not needed. In any case, the following is how to re-install exim. The procedure needs to be a little different than what you will find here:
help.directadmin.com/item.php?id=125
- Go back to that source directory we made earlier and run these commands:
# mkdir exim
# cd exim
# wget http://files.directadmin.com/services/all/exim/exim-4.69.tar.gz
# tar xvzf exim-4.69.tar.gz
# cd exim-4.69/Local
# wget http://www.directadmin.com/Makefile
# ee Makefile
- delete the "added April 9, 2008" section entirely and save
# perl -pi -e 's/^EXTRALIBS/#EXTRALIBS/' Makefile
# cd ..
# make
# make install
# cp -f /usr/sbin/exim-4.69-1 /usr/sbin/exim
# chmod 4755 /usr/sbin/exim
# /usr/local/etc/rc.d/exim start
- It should start without error this time.

6. Initial DA Setup: Use the links in the previously captured screen output for a checklist to setup and configure the control panel.

7. Build CUSTOM kernel with QUOTA:
- This step is optional, and included in case you wish to enforce quotas. I'm not doing this currently, but here are my instructions from before that you may find useful. If someone has a good link to some better instructions, I'll replace this with that.

Login ssh
# cd /usr/src/sys/amd64/conf
# cp GENERIC CUSTOM
# ee CUSTOM
change ident to CUSTOM
ident CUSTOM
At the end of the options section add:
# CUSTOM
options QUOTA # CUSTOM Change: Add quota support
save file
# config CUSTOM
Note the compile directory and the note:
Don't forget to do"make cleandepend && make depend"
cd to the directorygiven. Example:
# cd ../compile/CUSTOM

Note: The following step is going to take a long time:
# make cleandepend && make depend && make && make install && shutdown -r now
Note: You should see CUSTOM a lot in the compile process. If you see GENERIC, you have a problem.

Check the kernel:
login and type uname -a
It should say CUSTOM instead of GENERIC

Check quotas:
# ee /etc/fstab
check that you see the quotas on your /home volume like this or add:
/dev/da0s1h /home ufs rw,userquota,groupquota
# /usr/sbin/repquota /home
# ee /usr/local/directadmin/conf/directadmin.conf
- Look for or add quota_partition=/home
- Restart DirectAdmin
Comment: You should see a list of users and how much they are using
# /usr/sbin/repquota /home

Hopefully this procedure will help you retain a few more hair folicles.
 
Last edited:
How To install DA on FreeBSD 64 7.x, with no hacks required.
Interesting and comprehensive How-To.

JBMC, the publishers of DirectAdmin, don't support this. Do you? Otherwise I'd be hard pressed to use it in a live server hosting live sites, without a support venue.

EDIT: I've just found today (10-JUL-2009) that DirectAdmin now DOES support 64-bit FreeBSD 7.x. My error.


Jeff
 
I wouldnt consider it a real how-to. Maybe your interpretation on how you got it to work for you. I would second guess half of the way you did things and the commands you used to ensure they were done.
 
Interesting and comprehensive How-To.

JBMC, the publishers of DirectAdmin, don't support this. Do you? Otherwise I'd be hard pressed to use it in a live server hosting live sites, without a support venue.

Jeff

Hi Jeff,

I must be missing something here. They sell licenses for 7.x 64-bit. Both I and JBMC support it. http://www.directadmin.com/install.html If you mean use it in production, then the answer to that is yes I do. I have one 7.1 64 that serves 66 php pages a second during busy times of the day, and another 7.2 64 bit as a couple weeks ago. I have found no difference working with 7.0 64 bit - 7.2 64 bit.

I have a copy and paste procedure like this for DA that puts everything on ports, if that's what you are referring to, but that's not this. That JBMC doesn't support although I, they, and several others here have contributed to that. The only issues I ran into with that is there is always some clean-up that needs to be done when I do CP updates. That needs some thought yet (and time) and I wouldn't recommend that yet for general hosting. The being maintained by ports is nice though.

What am I missing?
 
Last edited:
I wouldnt consider it a real how-to. Maybe your interpretation on how you got it to work for you. I would second guess half of the way you did things and the commands you used to ensure they were done.
I'm looking forward to incorporating your suggestions to change it for the better that will benefit everyone. Until then, these instructions provide a procedure that will result in a solid DA install on FreeBSD 64 of which I have way too much experience doing for my own liking, and I have been running the 64s in hard production since January.
 
i'm running freebsd 7.2 64 now for 3 weeks . and did almost the same as this how2

only extra part , had to make a group called admin before apache would startup.

installed zend from ports , and everything worked.
and installed ioncube (manual)

now hosting 40 domains on it.

greetings Franco.

(3 times installed it now, and u realy have to have a clean install of freebsd before u install DA , everything u install from ports before u install DA is making errors, so just do that after u install DA)
 
i'm running freebsd 7.2 64 now for 3 weeks . and did almost the same as this how2...now hosting 40 domains on it....everything u install from ports before u install DA is making errors
I agree. With 32 bit, installing wget from ports, which pulls in perl and friends, is the way to go. However, that same logic when applied to 64 bit poisons the install, creates a lot of extra work, and keeps you on the edge of your chair when doing CP updates. Their script works pretty slick if you stay away from ports until after the install has been completed.

installed zend from ports , and everything worked.
and installed ioncube (manual)
This is quite coincidental. I always install zend, eaccellerator from ports as well. And I also install IonCube on each as well as a matter of course. If you have any tweaks to improve it, give a shout and I'd change anything that makes sense.

Thanks!
 
I must be missing something here. They sell licenses for 7.x 64-bit. Both I and JBMC support it.

Mea culpa (my error). I hadn't noticed that DirectAdmin is now supporting 64-bit FreeBSD 7.x. I'm glad to see it.

Jeff
 
Back
Top