Gregory A. Lussier

Icon

IT Consultant

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.

  1. Download CentOS 5.4 i386 from http://isoredirect.centos.org/centos/5/isos/i386/
  2. Install CentOS 5.4
    1. Boot from the CD or DVD.
    2. Type
      linux text
    3. Press Enter.
    4. 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.
    5. Press Enter on the OK button.
    6. Choose the language and keyboard and press OK.
    7. Choose Yes and press OK.
    8. Choose “Remove all Linux partitions on this drive and create default layout” and press “OK”.
    9. Confirm by clicking on Yes.
    10. Don’t review the partitioning layout.
    11. Press Yes to configure your ethernet adapter.
    12. Enable IPv4 by going down to IPv4 using the arrow key and press spacebar to select it.
    13. Click OK.
    14. Click OK for both DHCP and DNS.
    15. Choose your time zone.
    16. Type a password you’ll remember.
    17. Press OK.
    18. Unselect GNOME (don’t select anything).
    19. Press OK.
    20. Press OK for the log.
    21. Wait for the package installation.
    22. Eject the media and press Reboot.
  3. Post-installation steps
    1. Select “Firewall Configuration” and then press “Run tool”.
    2. Disable the security level and select Disabled for SELinux. (Note that it’s only suitable for a hobby system)
    3. Press OK.
    4. Press Exit.
    5. Login using user “root” and the password you chose during the installation
  4. Install Webmin
    1. 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
  5. Update and upgrade the install
    1. yum -y upgrade
    2. Reboot the computer.
    3. yum -y update
    4. Reboot the computer.
    5. yum -y update
    6. Make sure to repeat the update step until no more updates appear.
  6. Download and install Asterisk
    1. 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
      #
  7. MySQL: Import the following file into PhpMyAdmin using the SQL or Import function.

Cisco Packet Tracer

Finally, these are the Packet Tracer files I have done for the third CCNA Cisco Network Academy Class.
Packet Tracers
I will soon be publishing my own CCNA overview guide. Stay tuned to get a link to a free PDF of its BETA version.

Cut your cellphone bill

You may have a personal cellphone. If you are lucky, you don’t call much daytime, don’t use text messaging, don’t use Internet, and call most of the time after 9PM. If you’re like me, and you want to be able to call anytime, text whenever you need it, and browse the Internet, read your emails, receive calendar notifications, get ready to pay for those services. In Canada, smaller plans include 50 minutes daytime per month, 1 000 minutes for nights and weekends (from 9PM) and cost about 20,00 $, taxes included. When you want the long-distance, text, Internet, minutes anytime thing, you will pay 50,00 $ to 100,00 $. Let me show you how Wi-Fi phones can cut your personal or business mobile bill in two. If you’re a business owner, you’ll find useful hints on how to take the Wi-Fi opportunity.

Read the rest of this entry »

Asterisk Server

Asterisk is a PABX (private automatic branch exchange) open source software. It can run on many computers and server types, as well as on many Linux distributions. It can be used by various types of users, including SOHO, medium sized entreprises and large enterprises. It acts like an AT&T, Nortel or other proprietary device but lets the user customize every setting without needing to ask the seller to do those changes. It can bridge PSTN and VoIP networks together with special hardware that can be bought from Digium (the company that authors Asterisk) and some other small competitors. Asterisk brings a change in an industry led by giants like Nortel and let small businesses create themselves a PABX from scratch. Let me show you how I use Asterisk at home and office.

lapresse2

Read the rest of this entry »

RSS BBC Tech

  • Nanotech 'fuse' for novel battery 09/03/2010
    A never-before-seen reaction in nanotubes could make for batteries that pack a mighty punch, say researchers. […]
  • Final Fantasy 09/03/2010
    Costumed fans queue for launch […]
  • Sony eyeing June launch of 3D TV 09/03/2010
    Electronics giant Sony says its new 3D television will be on sale in Japan from June, with a cost of £2,600 for a 46-inch screen model. […]
  • Games migrate to the social side 09/03/2010
    The merging of social networks and games is set to dominate this year's Game Developers Conference in San Francisco. […]
  • Facebook death 'lessons to learn' 09/03/2010
    The home secretary says internet safety lessons must be learned after a convicted sex offender contacts and kills a teenager. […]

RSS Wired Tech

RSS NYT Business Computing

RSS NYT Tech

Get Adobe Flash playerPlugin by wpburn.com wordpress themes

Gregory A. Lussier is Digg proof thanks to caching by WP Super Cache