Base Install of
Asterisk on an i386 CentOS/RHEL box:
More as an aide memoir for us than anything
else, but if somebody does find it useful, then that's good too!
For reasons detailed elsewhere, you're best not using a GUI, so do
the installation from the command line ('linux-text' at the GRUB
prompt). When you select the packages, the only one you need is
'server'. Disk partitioning, networking etc. is all entirely up to you!
At your first login, you'll be presented with a simple
administration screen. Disable SELinux and (for now) the firewall.
Dependencies
The first thing to do is to get your box up to date. Try:
yum -y upgrade
and then reboot. Otherwise, to update all the installed packages, at
the shell, run
yum -y update
When you've done either of the above, reboot the machine when it's
finished (as it'll install a new kernel) and then run
yum -y update
again and repeat until there are no more updates.
Quick method:
Do you trust me? If so, the line below will install all the
dependencies you need (and then some!) - cut and paste from here if
you're happy to install things you may or may not need.
yum -y install gcc gcc-c++ kernel-devel bison \
openssl openssl-devel perl perl-Net-SSLeay perl-Crypt-SSLeay \
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
Individual
application specific dependencies
Asterisk
We've got to be able to compile it!
yum -y install gcc gcc-c++
Note that you may need to use the following if you are running a Xen
enabled kernel:
yum -y install kernel-xen-devel
If you want the 'zttool' application, you'll need to:
yum -y install newt-devel
Other things you may find useful (if they're not already installed):
yum -y install mlocate lynx tar wget nmap bzip2
mod_ssl crontabs vixie-cron
Speex (optional)
Speex support depends on 'speex_preprocess_ctl' which is not
available in the standard Speex packages. It may be possible to compile
an older version of Speex if required.
ODBC stuff (optional)
Note that if you have already installed Asterisk, you will need to
run 'configure', 'make' and 'make install' to detect ODBC and compile
it in.
yum -y install unixODBC unixODBC-devel
libtool-ltdl libtool-ltdl-devel
MySQL ODBC
interface/connector (optional, but required if
using ODBC and MySQL)
yum -y install mysql-connector-odbc
And then edit the file '/etc/odbcinst.ini' (or
'/usr/local/odbcinst.ini') and replace 'Driver = /usr/lib/libmyodbc.so'
with 'Driver = /usr/lib/libmyodbc3.so'
MySQL (optional)
yum -y install mysql mysql-devel mysql-server
chkconfig mysqld on
service mysqld start
PHPMyAdmin (optional)
Download the latest version from http://www.phpmyadmin.net/,
unzip/unbzip/untar into /var/www/htdocs/phpmyadmin (for the time
being). Make sure Apache starts on boot.
yum -y install php-mysql php-mbstring php-mcrypt
chkconfig httpd on
service httpd start
Surf to https://i.p.address/phpmyadmin and check it works.
Webmin (optional)
If SSL is required, ensure that the correct bits are installed
yum -y install openssl openssl-devel perl
perl-Net-SSLeay perl-Crypt-SSLeay
Download the latest version of the RPM from http://www.webmin.com/
rpm -i webmin-VERSION
chkconfig webmin on
service webmin start
Surf to https://i.p.address:10000 and check it works.
Download and
install Asterisk and components
Download
Download the latest asterisk version /usr/src/asterisk and untar
the files as follows:
mkdir -p /usr/src/asterisk
cd /usr/src/asterisk
wget
http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-1.6.1-current.tar.gz
wget
http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-addons-1.6.1-current.tar.gz
wget
http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/dahdi-linux-complete-current.tar.gz
wget
http://downloads.digium.com/pub/libpri/libpri-1.4-current.tar.gz
tar -zxf dahdi-linux-complete-current.tar.gz
tar -zxf asterisk-1.6.1-current.tar.gz
tar -zxf libpri-1.4-current.tar.gz
tar -zxf asterisk-addons-1.6.1-current.tar.gz
You'll end up with four tar files and four directories in the
directory '/usr/src/asterisk'.
Libpri (optional)
If you are using E1 cards you need to install LIBPRI. If you do
want to use LIBPRI, make sure you compile and install it before you
compile Asterisk. Replace 'VERSION' with the correct details.
cd /usr/src/asterisk/libpri-VERSION
make clean
make
make install
DAHDI
You're pretty much going to need DAHDI. If not for any hardware
then for the dummy timer anyway. Note that the stock CentOS kernels
come with a 1000HZ timer and so don't need recompiling (phew!). Replace
'VERSION' with the correct details.
cd
/usr/src/asterisk/dahdi-linux-complete-VERSION
make all
make install
make config
Edit /etc/dahdi/modules, /etc/dahdi/system.conf and
/etc/asterisk/chan_dahdi.conf for your site.
Set DAHDI to start automatically and then start it.
chkconfig dahdi on
service dahdi start
Asterisk
cd /usr/src/asterisk/asterisk-VERSION
make clean
./configure
Choose which options to install (audio files, voicemail storage,
codecs etc.)
make menuselect
make
make install
Install sample files in /etc/asterisk, install docs/manpages and set
to start on boot.
make samples
make progdocs
make config
chkconfig asterisk on
Check Asterisk starts properly:
asterisk -vvvvvvvvvvvvvvvvvvvc
stop now
If not, you've probably not been following these instructions
carefully! Assuming it does start properly, you probably want to start
it in the background:
service asterisk start
Asterisk-addons
cd /usr/src/asterisk/asterisk-addons-VERSION
make clean
./configure
make menuselect
Choose what you do and don't want. Unless you really need oh323,
deselect it as it can be the cause of compilation woes.
Applies to |