# Installation hints



## babyz (Jan 18, 2013)

Hello everybody  I'm new here and on the FreeBSD world (but I use Linux everyday), and I want to thank you in advance for helpful replies 

So, I recently bought an HP Proliant GL120 G7 server and I have 4GB RAM and 2 Sata HD (500GB each)

I now want to use FreeBSD on it instead of CentOS becouse I want to learn it and in the mean time hosting my web production server.

My questions are:

1) My server has RAID controller for RAID 0/1/10 (Smart Array B110i) but I've never used the RAID system so now I want to use it and I'll use RAID 1. If I set up the RAID in the controller will I need something else to configure in FreeBSD Pre-post installation?!

2) How can I partition the 2 HD supposing they are in RAID controller (RAID 1)? which directory structure should I use? like /boot and /usr in one and /home in another etc... What are best practices to do this? (I'm going to use the whole disk(s) space of course for FreeBSD

3) Which filesystem should I use? I read a lot about ZFS but I never used it nor I can configure it :/

Again, thanks a lot in advance guys


----------



## babyz (Jan 18, 2013)

I set the thread to solved but I made a mistake.

I forgot to tell that I need the system to be encrypted (Geli?) so basically if I turn off the server my /home (and where *I* run my jails too) isn't readable anymore.


----------



## kpa (Jan 19, 2013)

babyz said:
			
		

> Hello everybody  I'm new here and on the FreeBSD world (but I use Linux everyday), and I want to thank you in advance for helpful replies
> 
> So, I recently bought an HP Proliant GL120 G7 server and I have 4GB RAM and 2 Sata HD (500GB each)
> 
> ...



1) Set up the raid controller to JBOD if you're going to use ZFS. ZFS doesn't play well with any other RAID system.

2) /boot is best left on the root partition because the FreeBSD loader expects to find the kernel and kernel modules on the root partition.

3) You could set up the base system on UFS and use ZFS for the data.


----------



## babyz (Feb 1, 2013)

Thanks for the reply!

I just need some other hints  

You say: /boot + base system in the main HD under UFS...This is ok but, I'm relatively new to FreeBSD, so, which other folders go with the base system? /boot and? I've also read about separating /var/log and set noexec and others on it but I didn't fully get how this should be done.

Also I'll use ezjail to setup 3 jails (nginx+php, postgres, ejabberd)


----------



## babyz (Feb 1, 2013)

Is there also any howto about correctly splitting FreeBSD folders to max out performance (and flag+permission to set to secure them)? Didn't find anything till now..


----------



## SirDice (Feb 4, 2013)

babyz said:
			
		

> Is there also any howto about correctly splitting FreeBSD folders to max out performance (and flag+permission to set to secure them)? Didn't find anything till now..



See tuning(7) and security(7).


----------



## babyz (Feb 5, 2013)

SirDice said:
			
		

> See tuning(7) and security(7).



I've just read those but they doesn't say much about my question..so I asked


----------



## fonz (Feb 5, 2013)

babyz said:
			
		

> Is there also any howto about correctly splitting FreeBSD folders[red]directories[/red]


Depends on what you mean by splitting.


----------



## babyz (Feb 6, 2013)

I mean mount point (probably)...like mounting / than /usr and then /usr/ports in different partitions for performance..The handbook says:

bootfs no mountpoint 512K
rootfs /
swapfs no mp
/var
/tmp
/usr

but I see many howto (specially about ZFS) that divide /usr and /usr/ports too for example


----------



## fonz (Feb 6, 2013)

babyz said:
			
		

> I mean mount point (probably)...like mounting / than /usr and then /usr/ports in different partitions for performance..


Okay, so you want partitioning advice. Well, the good news is that most people have opinions on this so if enough people are keeping an eye on this thread you should get plenty of suggestions. The bad news is that there are no rules set in stone. It depends a lot on intended/expected/actual usage and even just personal preference. Please specify in more detail what you want the machine to do (e.g. servers you wish to run, and/or desktop usage), how much disk space you have available and whether or not you intend to use encryption.

As a general rule of thumb:
Having only one partition (plus perhaps swap and/or in case of GPT a boot partition) is technically enough, but generally not recommended.
Typical _candidates_ for separate partitions include /home, /tmp, /usr, /var and perhaps directories related to certain services (e.g. /usr/local/www or /var/mail).
Some people like to further split /usr and/or /var, but whether this is necessary or even desirable differs between situations.
You may want to have a look at hier(7) in order to get an idea of what the FreeBSD file hierarchy looks like, what can be found where and whether or not you may want to create separate partitions for anything. Note that on FreeBSD systems it's generally not a good idea (if at all possible) to create separate partitions for /root, /boot, /dev (we have devfs(8) for that) or /etc.


----------

