1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Check out the 6 new Certified Incredible PBX Builds for Asterisk 11 and 13 featuring CentOS 6, Ubuntu 14, Raspberry Pi 2, and Asterisk-NOW.
    Dismiss Notice

FYI Install PIAF on CentOS Existing Installation

Discussion in 'Add-On Install Instructions' started by jroper, Jul 6, 2010.

  1. jroper

    jroper Guru


    Here is an install script I just hacked together to prepare a 32 bit CentOS server for a PBX in a Flash install, e.g. on a hosted server.

    It only works on 32bit, but a 64 bit version can easily be done if there is a demand.

    I've tested it once, and it did not seem to throw any errors, so if anyone has any issues, let me know via this thread.

    • Make sure you have internet access and DNS resolution.
    • Download the tarball attached to this post, and put it somewhere on your system.
    • untar it - tar zxfv install-piaf-on-existing-centos.tar.gz
    • Run it - ./install-piaf-on-existing-centos.sh
    • Follow the on screen instructions.
    • At the end, reboot when prompted.
    • Login.
    • type piafdl
    • Installation continues as per any other PiaF install.

    The script is in clear text, and as with all install scripts provided by a 3rd party, I would advise that you read it first before running it to check you know what it is going to do to your system.

    It will not work on installing on OpenVZ, I need some modifications to the PIAF installation process to make that happen, as below:-

    Disabling the asterisk console accessible using the alt-F9 console - which from a security perspective is possibly not a bad idea anyway.

    #Disable TTY9 for OpenVZ
    sed -i 's/TTY=9/#TTY=9/g'  /usr/sbin/safe_asterisk
    and the following to allow Meetme to be compiled into Asterisk.

    #Create directory and file to get meetme working
    mkdir /usr/include/dahdi/
    cp /usr/src/dahdi-linux-complete/linux/include/dahdi/user.h /usr/include/dahdi/user.h
    This will not do any harm to an install.

    And the Zaptel equivalent.
    #Create directory and file to get meetme working
    mkdir /usr/include/zaptel/
    cp /usr/src/zaptel/kernel/zaptel.h  /usr/include/zaptel/zaptel.h
    Webmin is not included in the install routine, this is pretty simple to install anyway, just change the listening ports after installation in /etc/webmin/miniserv.conf from 10000 to 9001 (two places to change) and service webmin restart.

    wget http://downloads.sourceforge.net/project/webadmin/webmin/1.500/webmin-1.500-1.noarch.rpm?use_mirror=switch
    rpm -Uvh webmin-1.500-1.noarch.rpm

    #Changelog - Read through the thread to see if there are any updates
    #6th Septempber 2010
    #Change php-pear-DB from php-pear-db
    #16th November 2010 v1.02
    #Rewrite to support PiaF and 64 bit
    #This script rewrite was sponsored by Sheldon Steele of the ITS Group, http://www.itsgroup.org/
    #version 1.03 released with new 32 bit yum list.
    #Change php-pear-DB from php-pear-db v1.04

    Attached Files:

  2. Nixi

    Nixi New Member


    Thank you for making this script. I need to install PIAF on a virtual server (KVM) remotely and I cannot use the ISO.

    I started with Centos 5.4 32bit which I upgraded to Centos 5.5 and then followed your instructions. It did install many things but it seems that Asterisk and Mysql and possibly other things did not get installed or do not startup. Some directories are not there.

    I also after seeing it failed tried the update-source.

    Is there anything that should be installed from start? I can try to find the log files and post if that could help out.

    I would be happy to try it out again on a new machine.
  3. jroper

    jroper Guru


    This should install everything to make the ISO look like a PiaF iso, so that the payload can be downloaded and installed, when you run piafdl

    You did run piafdl didn't you after running this script?

  4. Nixi

    Nixi New Member

    Yes I did run the piafdl. It looks like the normal PIAF with status window when I log in with ssh but almost all services are in red.

    I will give it a new try tomorrow and see if I maybe get better luck.

    Thank you!
  5. jroper

    jroper Guru


    The modus operandi was find out using yum tools what was installed on a clean fresh install of PBX in a Flash, take those packages, and turn them into a yum command, then add in the packages that are not in the repository.

    I would ensure that all the yum commands in the script ran correctly.

    This is a very simple script, and provided you have internet access, there really is little to go wrong.

  6. Nixi

    Nixi New Member

    I started up a new machine and this time everything seems to work.

    Thank you!!!
  7. Bitnetix

    Bitnetix Guru


    I'm about to put your script to the test on CentOS 5.3 and 5.4 fresh installs.
  8. jroper

    jroper Guru


    Please remember to ensure that SELinux is switched OFF before starting the install, as some errors will occur with reloading asterisk from freePBX.

    The way to do this is type setup at the command prompt, then firewall.

    Note that if you are not careful you can end up resetting your firewall to the default, which is fine if you have not started installing yet, but annoying if you have installed.

  9. mainenotarynet

    mainenotarynet Not really a Guru - Just a long time user

    Piaf with CentOS and cPanel?

    I have a remote VPS and would love to save some $$ by putting PiaF in as a user on my main box (i am paying for a second as a matter of ease but if this can be done -- using CentOS 5.5 and CPanel (instead of webmin), could you help there or am I better off leaving the separate box as is?

    See I am used to Cpanel and can add emails to that and configure the smtp/pop servers in there but can't figure this out in webmin/dovecot.

    In this way every extension could have its own email on the system to add to their favorite email client or even webmail (e.g. ext 1000 could have 1000@mydomaingoeshere.biz) this way the email voicemail could easily be set ad extensions are set up. and also the sip/1000@default could even be sip/1000@mydomaingoeshere.biz to make it more 'custom'

    I am new to PiaF and am using this as an experiment for myself and a small home business where I hope to get others from around my state in a network using softphones that can ring cells when not by their computers.

    If possible -- great (how-to) if not - no loss just a passing thought.

    Thanks and keep up the great work
  10. jroper

    jroper Guru

    I just attempted a commercial install with CPanel. it was not a success. Suggest you order a server without Cpanel.

  11. HavocStyles

    HavocStyles New Member

    Hi Joe,

    Reason why gnome and all the X11 stuff gets installed? Does asterisk need the libs? Just curious, and want to cut the bloat?

  12. jroper

    jroper Guru


    No idea, however, all that I did was check what packages were installed on a fresh PiaF installation, by typing "yum list installed" wrote it to a text file, and manipulated the file to put it all on one line, so I could put:-

    yum -y install <<all the packages from a standard PIAF isntall"

    So if it is in my script, it's because it's in PiaF as standard.

  13. HavocStyles

    HavocStyles New Member

    Hmmm interesting, yeah my 5 min hack dirty script in the other thread didn't work out to well, and missed some stuff. But yours ran through just fine =)
  14. wardmundy

    wardmundy Nerd Uno

    If it ain't broke... :wink5:
  15. HavocStyles

    HavocStyles New Member

    That's how I learn, I break it and fix it a couple two three times lol ;)
  16. wardmundy

    wardmundy Nerd Uno

    All we'd ask is that, once you get it fixed, please document it for everyone else. ;)
  17. esampathj

    esampathj New Member

    Can't see Freepbx admin page on the PIAF conrol panel


    I just installed PIAF using your script. It worked fine. But there was a small problem. When i log in to PIAF admin page i couldn't find a place to log in to the freepbx gui. I attached the pic of my admin page.

    What can be the wrong ?

  18. jroper

    jroper Guru


    This looks like FreePBX did not install, which may be because asterisk did not install.

    Check the install log in /root

  19. usa4148

    usa4148 Member


    How'd the CentOS 5.4 cloud install go?

  20. Bitnetix

    Bitnetix Guru

    If you're talking to me (Eric), my installs were not cloud installs. They were on raw metal boxes we own installed in remote data centers with TCP/IP KVM switches. Quite straightforward, if you're wondering.

Share This Page