How To: Install DA on FreeBSD

existenz

Verified User
Joined
Jul 18, 2003
Messages
607
Location
/dev/null
We are going to do a simple install of DirectAdmin on a FreeBSD 4.x, 5.x system. You MUST make sure your install is fresh don't try to install DirectAdmin on top of previous install. It can be done but it causes all kinds of problems and its easier to just start from scratch.

So here is a basic run down of what we will do:

1) Install FreeBSD
2) Update with cvsup
3) Install ipfw firewall
4) Install DirectAdmin

We are going to assume you have some BSD or Linux background, you will also need a FreeBSD Mini CD (or equivalent).

1) Get your machine up and running from the CD. You will now be in sysinstall the installer program for FreeBSD. Lets start with the Standard install.

The next screen is FDISK the partition program. In our install we are going to use the entire disk do use the D key to delete all your partitions and then use the A to let it use the entire disk. Q to quit and now you will be prompted to Install the Boot Manager. You can select the Standard since this is a server.

The next screen will ask you to create the slices (partitions). You should never partition your FreeBSD system with one just a /swap and a /(root) partition for security and performance reasons. So we recommend the following partition scheme:

/ #1G
/swap #2x the installed RAM
/var #10G
/usr #remaining available space

Now you will be asked for Choose the Distributions and we will just choose Minimal. You can go through the install process. You can choose to install Linux binary compatible if you wish. The only thing you should to install as Packages is compat4x. This is the FreeBSD 4 compatibility software which you probably will need later.

You will get to a screen to create users and groups. You should select User create a new user. The only box you need to pay attention to is group, add this user to the wheel group. This will allow you to change to the root user from ssh.

You can continue through the install we are skipping some steps which I feel you can understand for yourself. Reboot the box and lets move on.

The following steps are NOT necessary but I strongly urge you to complete them before installing DirectAdmin. This is a server you want the highest security and stability!

2) Now it is time to update your system to the latest code for your version of FreeBSD. Because of the nature of the OS it is updated frequently.

Click here for the CVSup how to

3) If this is a server you will want to install a firewall. FreeBSD comes with a firewall built-in called ipfw. It is easiest to install this now since you will need to compile the kernel and would result in unnecessary downtime.

Click here for the ipfw Firewall how to

4) Now it is time to install DirectAdmin. You can do this by ssh'ing into your server as the user you created above, then su to root. Download the setup file:

The only trick to remember is know what NIC card you have. It is possible to have more than one NIC card. You will be asked which card you are using during the install. Because FreeBSD names the device by the manufacture it could be confusing.

host# ifconfig

After you see inet you should see the ip you setup during the install. Just remember the card that goes along with that.

host# fetch http://www.directadmin.com/setup.sh
host# chmod 755 setup.sh
host# ./setup.sh

You should be able to continue though the install and be able to login with the username and password.

Thanks for rhoekman, Xuru for also lending their help with this.
 
Last edited:
Hi,
do you have any how to about to install spamassassin (and mailscanner if it possible) in freebsd?
In the forum i have see info only about redhat. But it is possible to so the same with freebsd?
Thanks a lot.
Christos
 
How to install SpamAssassin with MailScanner? SpamAssassin is easy but I have not tried yet to do it with MailScanner I will get back to you once I have it working properly.h
 
existenz said:
How to install SpamAssassin with MailScanner? SpamAssassin is easy but I have not tried yet to do it with MailScanner I will get back to you once I have it working properly.h
Thanks for the info
ok, so how i can install spamassassin in freebsd box? (i can do the mailscanner later, when i find easy how to.)
So can you give the instractions of the spamassassin?
Thanks a lot
Regards,
Christos
 
Its stright foward search the forums for SpamAssassin.

host# cd /usr/local/directadmin/scripts/
host# ./spam.sh

I will look into more information and see what I can come up with.
 
i'm confused, Olivier.

Are you writing that the home partition on your DA system was built as only 1 G ?

That's not good, since all the sites go into /home.

Jeff
 
No, no, I'm referring to this Howto which says :

/ #1G
/swap #2x the installed RAM
/var #10G
/usr #remaining available space

I don't see a /home here, so I guess / will get everything and 1G seems to be awefully small.
 
Anyway, can it be bad to have too many partitions?

I think I'll go with :

/boot #100MB
/ #10G
/swap #1G
/var #10G
/home #30G
/backup #10G
/usr #remaining available space

For a small server.
 
interfasys said:
No, no, I'm referring to this Howto
Which howto? You didn't link to one.

Whoever wrote that was wrong, if it was for DA.

It would work fine with the non-RPM install of Plesk, which puts everything, including websites, under /usr.

Perhaps for some other control panels as well.

But not for any control panel that uses /home for it's site directories.

Jeff
 
interfasys said:
Anyway, can it be bad to have too many partitions?
Not if youi know why you have them.

We use multiple partitions on our servers as well.
/boot #100MB
/ #10G
/swap #1G
/var #10G
/home #30G
/backup #10G
/usr #remaining available space
You don't say how much disk space you have, but in general this could end up with a lot more spce in /usr than in /home, which is very wasteful.

Here's what the space usage looks like on one of our linux servers; I don't think it should be much different on FreeBSD.
Code:
Filesystem            Size  Used Avail Use% Mounted on
/dev/md3              980M  154M  777M  17% /
/dev/md4               99M   14M   80M  14% /boot
/dev/md0               27G  3.0G   22G  12% /home
none                  250M     0  250M   0% /dev/shm
/dev/md1              2.9G  1.1G  1.6G  39% /usr
/dev/md2              5.8G  2.2G  3.3G  40% /var
Notice that we only use 1.1 G of space in /usr; you don't need much.

When we build servers today (this one is about a year old), we create a 5G partition for /usr, 10G for /var, 100M for /boot, 1.5G for /, and the balance for /home.

Jeff
 
Last edited:
It works just fine the way that Extensis wrote it out. I wouldn't call "/" home though "/" is just that "/" or root. /home is installed as a link to /usr/home which is a convenient way to use space in a DA install. I did it like that on my first DA server and it works great. I did seperate partitions for my others though.

Either way is fine. I just thought that I would clarify the original point that was made about the partition scheme in this How To (the one that we're in right now :D )

cheers,
brandt
 
interfasys said:
Anyway, can it be bad to have too many partitions?

I think I'll go with :

/boot #100MB
/ #10G
/swap #1G
/var #10G
/home #30G
/backup #10G
/usr #remaining available space

For a small server.

This is great if you are running a Linux distro but for FBSD this would be wrong.

/boot What is this for? FBSD does not have a boot partition

/root FreeBSD only installs a few items to root you probably could make it 200M and it would be fine

/swap 2xRAM

/var 10-15G

/backup anything you want but this is a added partition and not necessary. If the filesystem goes corrupt then what is the point? I would make this a second drive

/usr remaining space

The world structure is much different between Unix and Linux. What I did should work for most people and gives them the flexibility to upgrade and update without the hassles of having everything at one large /root
 
Back
Top