Elastix 1.6 installation for Proxmox 1.5

Discussion in 'General' started by gl1176, Jun 13, 2010.

  1. gl1176

    Joined:
    Oct 5, 2009
    Messages:
    55
    Likes Received:
    0
    Hi,

    It's been 8 months since my last post on the subject, and a lot has changed for both Proxmox and Elastix. I have done numbers of installations, and its time to update you guys on this. I will also post an installer for Elastix 2.0 when it releases. This is for a 64bit Proxmox install, so if your install is 32bit, then change accordingly. Remove the space in all http: and file: listings here. The forum's board doesn't display them correctly so I added a space. So here it goes:


    ### INSTALL DAHDI ON PROXMOX SHELL

    aptitude update
    aptitude safe-upgrade
    apt-get -y install gcc make pve-headers-`uname -r` sysv-rc-conf

    cd /usr/src
    wget http: //downloads.asterisk.org/pub/telephony/dahdi-linux/dahdi-linux-current.tar.gz
    tar -xzvf dahdi-linux-current.tar.gz
    cd dahdi-linux-2*
    make && make install

    cd /usr/src
    wget http: //downloads.asterisk.org/pub/telephony/dahdi-tools/dahdi-tools-current.tar.gz
    tar -xzvf dahdi-tools-current.tar.gz
    cd dahdi-tools-2*
    ./configure
    make && make install && make config

    sysv-rc-conf dahdi on
    /etc/init.d/dahdi start

    echo 'DEVNODES="dahdi/channel:rw dahdi/ctl:rw dahdi/timer:rw dahdi/pseudo:rw null:rw"' >> /etc/vz/conf/ve-pve.auto.conf-sample

    ###EDIT vz.conf TO ALLOW IPTABLES MODS IN VMs
    ###WARNING!!! THIS WILL RESTART ALL PROXMOX VMs!!!


    sed -i 's/IPTABLES="ipt_REJECT ipt_tos ipt_limit ipt_multiport iptable_filter iptable_mangle ipt_TCPMSS ipt_tcpmss ipt_ttl ipt_length"/IPTABLES="ipt_REJECT ipt_tos ipt_limit ipt_multiport iptable_filter iptable_mangle ipt_TCPMSS ipt_tcpmss ipt_ttl ipt_length ipt_state ip_conntrack_ftp ip_conntrack"/g' /etc/vz/vz.conf

    modprobe xt_tcpudp
    modprobe xt_state
    modprobe ip_conntrack
    /etc/init.d/vz force-reload

    ### DOWNLOAD CENTOS 5.3 x86_64 TEMPLATE FROM OPENVZ.ORG

    cd /var/lib/vz/template/cache
    wget http: //download.openvz.org/template/precreated/centos-5-x86_64.tar.gz

    ### ADD AND START A NEW CENTOS 5.3 OPENVZ MACHINE USING BRIDGED ETHERNET FROM TEMPLATE IN GUI

    ### COPY ELASTIX 1.6 REPO IN A FOLDER, ON PROXMOX SHELL
    ### $VID IS YOUR VZ MACHINE NUMBER

    cd /var/lib/vz/template/iso/
    wget http: //downloads.sourceforge.net/project/elastix/Elastix%20PBX%20Appliance%20Software/1.6/Elastix-1.6.0-x86_64-bin-29oct2009.iso
    mkdir /mnt/Elastix
    mount -t iso9660 -o loop /var/lib/vz/template/iso/Elastix-1.6.0-x86_64-bin-29oct2009.iso /mnt/Elastix
    cp -R /mnt/Elastix /var/lib/vz/private/$VID/usr/src

    ### INSTALL ELASTIX 1.6 ON CENTOS VM

    ifconfig eth0 $IP-ADDRESS/NETMASK
    route add default gw $GATEWAY

    yum -y install createrepo
    createrepo /usr/src/Elastix

    echo '
    [local]
    enabled = 1
    name = Elastix
    baseurl = file: ///usr/src/Elastix
    gpgcheck = 0
    ' > /etc/yum.repos.d/elastix.repo

    yum -y update

    yum -y install asterisk* elastix-* freeze fxload libmfcr2 lzop perl-HTML-TokeParser-Simple perl-WWW-Mechanize mod_ssl mlocate gcc gcc-c++ system-config-network-tui wget sox nano

    mv -f /etc/yum.repos.d/elastix.repo.rpmnew /etc/yum.repos.d/elastix.repo

    yum -y update

    yum clean all

    sed -i 's/TTY=9/#TTY=9/g' /usr/sbin/safe_asterisk
    sed -i 's/chown asterisk \/dev\/tty9/#chown asterisk \/dev\/tty9/g' /etc/init.d/asterisk
    sed -i 's/\/sbin\/start_udev/#\/sbin\/start_udev/g' /etc/rc.d/rc.sysinit
    sed -i 's/\/usr\/sbin\/fxotune -s/#\/usr\/sbin\/fxotune -s/g' /etc/rc.local
    sed -i 's/chown $AMPASTERISKUSER \/dev\/tty9/#chown $AMPASTERISKUSER \/dev\/tty9/g' /var/lib/asterisk/bin/freepbx_engine

    rm -rf /etc/asterisk/manager_custom.conf
    su asterisk -c 'touch /etc/asterisk/manager_custom.conf'

    chkconfig haldaemon off
    chkconfig bluetooth off
    chkconfig hidd off
    chkconfig asterisk off
    chkconfig dahdi off
    chkconfig wanrouter off

    rm -rf /etc/init.d/dahdi
    rm -rf /etc/init.d/wanrouter
    rm -rf /usr/src/Elastix

    echo 'DEVICE=eth0' > /etc/sysconfig/network-scripts/ifcfg-eth0
    system-config-network

    reboot
     
  2. ictdude

    Joined:
    Aug 12, 2009
    Messages:
    23
    Likes Received:
    0
    Hi,

    Could you upload the template ? I found a host where you i believe can do this
    and share it to the forum. I found this: Free online storage My girlfriend use it to store big movies she made.

    Cheers..
     

Share This Page