Feb 23, 2010 3
Install Asterisk 1.6.2.4 with Asterisk Addons 1.6.2 and MySQL on CentOS 5.4 i386
This is a complete tutorial on how to install CentOS 5.4 and then Asterisk and MySQL on any computer. I will soon be posting a template virtual machine in the form of a torrent file
Note: you can install Putty and SSH into your CentOS box once it’s installed. You will then be able to copy and paste lines easily from the code boxes below.
- Download CentOS 5.4 i386 from http://isoredirect.centos.org/centos/5/isos/i386/
- Install CentOS 5.4
- Boot from the CD or DVD.
- Type
linux text
- Press Enter.
- Move to skip using TAB key and press Enter. This step will prevent your computer to test the media. You can test it if you want but it’s quite long.
- Press Enter on the OK button.
- Choose the language and keyboard and press OK.
- Choose Yes and press OK.
- Choose “Remove all Linux partitions on this drive and create default layout” and press “OK”.
- Confirm by clicking on Yes.
- Don’t review the partitioning layout.
- Press Yes to configure your ethernet adapter.
- Enable IPv4 by going down to IPv4 using the arrow key and press spacebar to select it.
- Click OK.
- Click OK for both DHCP and DNS.
- Choose your time zone.
- Type a password you’ll remember.
- Press OK.
- Unselect GNOME (don’t select anything).
- Press OK.
- Press OK for the log.
- Wait for the package installation.
- Eject the media and press Reboot.
- Post-installation steps
- Select “Firewall Configuration” and then press “Run tool”.
- Disable the security level and select Disabled for SELinux. (Note that it’s only suitable for a hobby system)
- Press OK.
- Press Exit.
- Login using user “root” and the password you chose during the installation
- Install Webmin
-
cd /root wget http://downloads.sourceforge.net/project/webadmin/webmin/1.500/webmin-1.500-1.noarch.rpm?use_mirror=iweb rpm -i webmin-1.500-1.noarch.rpm
-
- Update and upgrade the install
-
yum -y upgrade - Reboot the computer.
-
yum -y update - Reboot the computer.
-
yum -y update - Make sure to repeat the update step until no more updates appear.
-
- Download and install Asterisk
-
yum -y install kernel-devel kernel-xen-devel gcc gcc-c++ libtermcap-devel ncurses-devel doxygen curl-devel newt-devel yum -y install unixODBC unixODBC-devel libtool-ltdl libtool-ltdl-devel mysql-connector-odbc yum -y install mysql mysql-devel mysql-server chkconfig mysqld on service mysqld start yum -y install php-mysql php-mbstring php-mcrypt chkconfig httpd on service httpd start vim /etc/odbcinst.ini # replace 'Driver=/usr/lib/libmyodbc.so' with 'Drive=/usr/lib/libmyodbc3.so' and uncomment the whole MySQL part. cd /var/www/html wget http://downloads.sourceforge.net/project/phpmyadmin/phpMyAdmin/2.11.10/phpMyAdmin-2.11.10-all-languages.tar.gz?use_mirror=iweb tar -zxvf phpMyAdmin-2.11.10-all-languages.tar.gz rm phpMyAdmin-2.11.10-all-languages.tar.gz # press Y and Enter mv phpMyAdmin-2.11.10-all-languages phpmyadmin cd /usr/src mkdir asterisk cd asterisk wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-1.6.2.4.tar.gz wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-addons-1.6.2-current.tar.gz tar -zxvf asterisk-1.6.2.4.tar.gz tar -zxvf asterisk-addons-1.6.2-current.tar.gz mv asterisk-1.6.2.4 asterisk mv asterisk-addons-1.6.2.0 asterisk-addons rm asterisk-1.6.2.4.tar.gz rm asterisk-addons-1.6.2-current.tar.gz cd asterisk make clean ./configure --disable-xmldoc make menuselect make make install make samples make config chkconfig asterisk on service asterisk start asterisk -vvvvvvvvc cd .. cd asterisk-addons make clean ./configure make menuselect make make install make samples vim /etc/asterisk/cdr_mysql.conf # Modify this file according to your # MySql configuration. Use PhpMyAdmin # for the most straight forward # installation. # [global] hostname=localhost dbname=asterisk table=cdr password=MYPASS user=astrealtime port=3306 sock=/var/lib/mysql/mysql.sock userfield=1 # vim /etc/asterisk/res_mysql.conf # [general] dbhost = localhost dbname = asterisk dbuser = astrealtime dbpass = MYPASS dbport = 3306 dbsock = /var/lib/mysql/mysql.sock # vim /etc/asterisk/extconfig.conf # uncomment and modify the following: queues => mysql,general,queues queue_members => mysql,general,queue_members sippeers => mysql,general,sip sipusers => mysql,general,sip voicemail => mysql,general,voicemail_users # vim /etc/odbc.ini [astrealtime] Description = Asterisk realtime and other FUNC_ODBC access Driver = MySQL Socket = /var/lib/mysql/mysql.sock Server = localhost User = astrealtime Pass = MYPASS Database = asterisk Option = 3 # vim /etc/asterisk/res_odbc.conf # ; Environment variables [ENV] ; Connections [astrealtime] enabled => yes dsn => astrealtime username => astrealtime password => MYPASS pre-connect => yes idlecheck => 3600 #
-
- MySQL: Import the following file into PhpMyAdmin using the SQL or Import function.



If you are systems administrator and have P3s lying around, got a peek of Citrix/MSTS, thought you could buy terminals to replace PCs for some users who don’t need much CPU power to perform their mail reading and Excel spreadsheets edits, look no further and use your old PCs.