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.

How to install Windows 7 from a USB drive?

  1. Plug the USB drive.
  2. Open a command prompt (Start Menu, All Programs, Accessories, right click on Command Prompt and select Run as Adminstrator).
  3. Type in the following commands:
      DISKPART
      LIST DISK 
      SELECT DISK 1
      CLEAN
      CREATE PARTITION PRIMARY
      SELECT PARTITION 1
      ACTIVE
      FORMAT FS=NTFS
      ASSIGN
      EXIT

      After the LIST DISK command, locate the number of your USB drive and use it in the SELECT DISK command.

    1. Insert the Windows 7 installation disk in the DVD reader or mount it using whatever software you like (Daemon Tools Lite, Alcohol 120%, etc.)
    2. Supposing D: is the letter of the drive where Windows 7 is mounted, and H: is the letter of your USB drive:
      D: CD BOOT
      CD BOOT
      BOOTSECT.EXE /NT60 H:
    3. Drag and drop the content of the Windows 7 Installation DVD in the USB drive.
    4. You are ready to install Windows 7 using the bootable USB drive you just created.

Install Windows XP from a USB drive

I had a laptop with no optical media drive and needed to install Windows XP. Windows Vista and 7 are built in with handy features to create bootable USB drive installations, but not Windows XP. I found this great tool Win Setup from USB (4.4 mb direct download .exe) to do so. Read the rest of this entry »

How to install Virtualbox Guest Additions for CentOS 5.4 Guest?

    Versions

  • Sun VirtualBox Graphical User Interface
    Version 3.0.12 r54655
  • CentOS 5.4 i386

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