Reply
 
Thread Tools Display Modes
  #1  
Old 07-06-10, 01:09 PM
jroper jroper is offline
Guru
 
Join Date: Oct 2007
Posts: 3,719
Install PIAF on CentOS Existing Installation
Hi

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.

Instructions
  • 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.
Caveats

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.

Code:
#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.

Code:
#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.
Code:
#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.

Code:
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
Joe

#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 1.7.5.5.3 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:
__________________
www.star2billing.com
Commercial Open Source Telephony

Last edited by jroper : 12-03-10 at 01:28 AM. Reason: Added what I think is the Zaptel equivalent above. --wm
Reply With Quote
  #2  
Old 07-12-10, 06:12 AM
Nixi Nixi is offline
Junior Member
 
Join Date: Mar 2009
Posts: 21
Hello,

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.
Reply With Quote
  #3  
Old 07-12-10, 01:40 PM
jroper jroper is offline
Guru
 
Join Date: Oct 2007
Posts: 3,719
Hi

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?

Joe
__________________
www.star2billing.com
Commercial Open Source Telephony
Reply With Quote
  #4  
Old 07-12-10, 02:00 PM
Nixi Nixi is offline
Junior Member
 
Join Date: Mar 2009
Posts: 21
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!
Reply With Quote
  #5  
Old 07-12-10, 02:06 PM
jroper jroper is offline
Guru
 
Join Date: Oct 2007
Posts: 3,719
Hi

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.

Joe
__________________
www.star2billing.com
Commercial Open Source Telephony
Reply With Quote
  #6  
Old 07-13-10, 06:28 AM
Nixi Nixi is offline
Junior Member
 
Join Date: Mar 2009
Posts: 21
I started up a new machine and this time everything seems to work.

Thank you!!!
Reply With Quote
  #7  
Old 07-13-10, 03:38 PM
Bitnetix Bitnetix is offline
Guru
 
Join Date: May 2009
Location: Western New York
Posts: 323
Joe,

I'm about to put your script to the test on CentOS 5.3 and 5.4 fresh installs.
__________________
Eric Loyd
Bitnetix Incorporated
Reply With Quote
  #8  
Old 07-17-10, 07:58 AM
jroper jroper is offline
Guru
 
Join Date: Oct 2007
Posts: 3,719
Hi

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.

Joe
__________________
www.star2billing.com
Commercial Open Source Telephony
Reply With Quote
  #9  
Old 07-17-10, 04:53 PM
mainenotarynet mainenotarynet is offline
Senior Member
 
Join Date: May 2010
Location: Bangor, ME USA
Posts: 162
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
Reply With Quote
  #10  
Old 07-17-10, 06:12 PM
jroper jroper is offline
Guru
 
Join Date: Oct 2007
Posts: 3,719
I just attempted a commercial install with CPanel. it was not a success. Suggest you order a server without Cpanel.

Joe
__________________
www.star2billing.com
Commercial Open Source Telephony
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 09:05 PM.


Design by Vjacheslav Trushkin, color scheme by ColorizeIt!.
Powered by vBulletin®
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Copyright ©2007-2012, Ward Mundy & Associates