Initial System Setup
Disable selinux
In /etc/sysconfig/selinux , change the following lines:
reboot, and verify the selinux status by running 'sestatus'. It should say:
SELinux status: disabled
SELinux status: disabled
Update Your System
yum -y updateyum groupinstall coreyum groupinstall baseInstall Additional Required Dependencies
yum install gcc gcc-c++ lynx bison mysql-devel mysql-server php php-mysql php-pear php-mbstring tftp-server httpd make ncurses-devel libtermcap-devel sendmail sendmail-cf caching-nameserver sox newt-devel libxml2-devel libtiff-devel audiofile-devel gtk2-devel subversion kernel-devel git subversion kernel-devel php-process crontabs cronie cronie-anacron wget vim php-xml
Add Asterisk/Digium CentOS Repos
cd /etc/yum.repos.d wget http://packages.asterisk.org/centos/centos-asterisk-12.repowget http://packages.asterisk.org/centos/centos-asterisk-11.repowget http://packages.asterisk.org/centos/centos-asterisk.repowget http://packages.digium.com/centos/centos-digium-12.repowget http://packages.digium.com/centos/centos-digium-11.repowget http://packages.digium.com/centos/centos-digium-1.8-certified.repowget http://packages.digium.com/centos/centos-digium-1.8.repowget http://packages.digium.com/centos/centos-digium.repoIPTables
You must disable the default iptables.  You can re-enable it later, once you have made the appropriate changes.  Information on iptables can be found with a quick Google search.  If iptables is left running, it will (at very least) block you from accessing the web interface.
See the current status:   
chkconfig iptables --list
chkconfig iptables --list
Disable iptables:
chkconfig --level 0123456 iptables off
chkconfig --level 0123456 iptables off
Stop the service (this skips rebooting again):
service iptables stop
service iptables stop
Auto Start MySQL
You must have mysql running for freepbx to operate normally.  You need to set it to start at boot time. with the following command:
chkconfig --level 345 mysqld on
chkconfig --level 345 mysqld on
Then start mysqld if you don't plan on rebooting during the installation phase:
service mysqld start
service mysqld start
Auto Start Apache
You will want Apache running, so you can access the FreePBX admin interface,  You need to set it to start at boot time. with the following command:
chkconfig --level 345 httpd on
chkconfig --level 345 httpd on
Then start apache if you don't plan on rebooting during the installation phase:
service httpd start
service httpd start
Install PearDB
pear channel-update pear.php.netpear install dbReboot server
reboot
Install Dependencies for Google Voice (If needed/wanted)
Install iksemel
cd /usr/srcwget https://iksemel.googlecode.com/files/iksemel-1.4.tar.gztar xf iksemel-*.tar.gzcd iksemel-*./configuremakemake installAdd the Asterisk User
Install and Configure Asterisk
Install DAHDI.
Install Asterisk
Install Asterisk-Extra-Sounds
Install and Configure FreePBX
Download and extract FreePBX.
export VER_FREEPBX=12.0cd /usr/srcgit clone http://git.freepbx.org/scm/freepbx/framework.git freepbxcd freepbxgit checkout release/${VER_FREEPBX}Set ownership permissions.
chown asterisk. /var/run/asteriskchown -R asterisk. /etc/asteriskchown -R asterisk. /var/{lib,log,spool}/asteriskchown -R asterisk. /usr/lib/asteriskmkdir /var/www/htmlchown -R asterisk. /var/www/A few small modifications to Apache.
sed -i 's/\(^upload_max_filesize = \).*/\120M/' /etc/php.inicp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf_origsed -i 's/^\(User\|Group\).*/\1 asterisk/' /etc/httpd/conf/httpd.confservice httpd restartConfigure Asterisk database in MYSQL.
cd /usr/src/freepbxexport ASTERISK_DB_PW=Change_Me109mysqladmin -u root create asterisk mysqladmin -u root create asteriskcdrdbSet permissions on MYSQL database.
mysql -u root -e "GRANT ALL PRIVILEGES ON asterisk.* TO asteriskuser@localhost IDENTIFIED BY '${ASTERISK_DB_PW}';"mysql -u root -e "GRANT ALL PRIVILEGES ON asteriskcdrdb.* TO asteriskuser@localhost IDENTIFIED BY '${ASTERISK_DB_PW}';"mysql -u root -e "flush privileges;"Restart Asterisk and install FreePBX.
cd /usr/src/freepbx./start_asterisk start./install_amp --installdb --username=asteriskuser --password=${ASTERISK_DB_PW}amportal chownamportal a ma installallamportal chownamportal a reloadFinally, one last mod and start FreePBX.
ln -s /var/lib/asterisk/moh /var/lib/asterisk/mohmp3amportal startStart FreePBX
Navigate:
http://yourlocalipaddress/admin or if you prefer http://localhost/admin
Install and Setup Commercial Modules
Enable the FreePBX Commercial yum repos
wget -P /etc/yum.repos.d/ -N http://yum.schmoozecom.net/schmooze-commercial/schmooze-commercial.repo
yum clean all to clean out yum cache so it will find out new RPMs
yum install needed RPMs for Commercial Modules
Restart Apache and Install Sysadmin
service httpd restartamportal a ma download sysadminamportal a ma install sysadmin 
