Here is a quick trick on centos/redhat or any yum powered platform
to install all packages that you may need to install asterisk.
It will even install mysql for you as well as odbc connecto
yum -y install gcc gcc-c++ kernel-devel bison openssl-devel
libtermcap-devel ncurses-devel doxygen curl-devel newt-devel
mlocate lynx tar wget nmap bzip2 mod_ssl crontabs vixie-cron
speex speex-devel unixODBC unixODBC-devel libtool-ltdl
libtool-ltdl-devel mysql-connector-odbc mysql mysql-devel
mysql-server php-mysql php-mbstring php-mcrypt flex screen