Software RAID1 CentOS Install
For default (non-software RAID) CentOS install skip to the next section.
Close ALL port forwards in the firewall to the server IP we are about to install
Install CentOS from DVD by booting from it. Set system time to UTC.
This procedure assumes your using the GUI install method. For "linux text" based install it is a bit different and less intuitive. I recommend using the GUI (default) method.
At the drive setup menu select "Remove all partitions from select drives"
Check the "create custom layout" box>select "next"
At the next menu it will show you the current default configuration. If it shows ANYTHING beside 2 or more 100% free space drives click on the LVM and/or partitions and press "delete". All you want right now is 2 or more drives showing 100% free space, no partitions or LVM volumes.
1) At the next menu select RAID>create software RAID partition>ok
Select one of the 2 RAID disks and create boot partition of 100MB check "force to be primary partition"
Repeat and again select the same drive and create size equal to twice the amount of RAM
Repeat and again select the same drive and select "fill to maximum allowable size"
Now you should see one of your two drives with three partitions labelled as type "Software RAID"
2) Now repeat the above procedure EXACTLY the same for your second drive.
Now you should see both drives with 3 equivalent partitions all labelled as type "Software RAID"
Go back to the first drive "root" partition and click "edit" and change from "fill to maximum allowable size" to "fixed size" and use the same size as it was before. This is done so that the ordering of the partitions on both drives (boot=md0, swap=md1, root=md2) are exactly the same.
3) Now repeat but this time select "create RAID device"
Check the 100MB partition on each drive so you have 2 check marks and select RAID 1, boot, ext3
Now Repeat and select the partition equal to twice the size of your RAM on each of the two drives and select RAID 1, swap
Repeat again and select the root partition on each of the two drives and select RAID 1, /, ext3
We could also create LVM volumes but that is not required for an Asterisk installation so in my humble opinion it is not recommended and beyond the scope of this installation procedure.
So now the main menu should show 3 RAID 1 devices corresponding to the 3 identical pairs of Software RAID partitions on the two drives. It sounds a bit confusing when in writing but when you go through the GUI and actually do everything it should make a lot more sense.
Now select "Next" twice (using default GRUB bootloader options).
Set static IP, netmask, gateway, DNS server
Set hostname to something like "asterisk.local". If you have multiple installs it is important to make this hostname unique for each install so when you get email notifications you will know which PBX is sending it.
NOTE: If you have 2 ethernet adapters/ports you can make eth0 and eth1 identical except eth0 is active on boot and eth1 is NOT! That way if one ethernet port ever fails you can quickly make the other port active.
Ensure that all package groups and modules in default and custom install packages are DE-selected for install (including "base system") so that only a bare minimal install is done:
For performance and security reasons it is important to update the system immediately after install.
yum -y update
reboot
The following packages also need to be installed with yum:
yum groupinstall core
yum groupinstall base
yum install php-mysql mysql-devel ncurses-devel tftp-server php-pear libtermcap-devel nano ntp wget setuptool gcc gcc-c++ make flex patch bison kernel-devel byacc mysql-server sendmail cpuspeed system-config-network-tui acpid smartmontools
Disable Firewall and SELinux
setup agent
Go to firewall configuration and ensure SELinux and Firewall are disabled
Reboot
reboot
Skip the next section (non-RAID CentOS install) and proceed to the section after that.