FYI Install PIAF on CentOS Existing Installation

jroper

Guru
Joined
Oct 20, 2007
Messages
3,832
Reaction score
71
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
 

Attachments

  • install-piaf-on-existing-centos.tar.gz
    4.4 KB · Views: 356

Nixi

New Member
Joined
Mar 17, 2009
Messages
21
Reaction score
0
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.
 

jroper

Guru
Joined
Oct 20, 2007
Messages
3,832
Reaction score
71
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
 

Nixi

New Member
Joined
Mar 17, 2009
Messages
21
Reaction score
0
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!
 

jroper

Guru
Joined
Oct 20, 2007
Messages
3,832
Reaction score
71
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
 

Nixi

New Member
Joined
Mar 17, 2009
Messages
21
Reaction score
0
I started up a new machine and this time everything seems to work.

Thank you!!!
 

Bitnetix

Guru
Joined
May 21, 2009
Messages
323
Reaction score
0
Joe,

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

jroper

Guru
Joined
Oct 20, 2007
Messages
3,832
Reaction score
71
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
 

mainenotarynet

Not really a Guru - Just a long time user
Joined
May 29, 2010
Messages
754
Reaction score
155
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 [email protected]) this way the email voicemail could easily be set ad extensions are set up. and also the sip/1000@default could even be sip/[email protected] 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
 

jroper

Guru
Joined
Oct 20, 2007
Messages
3,832
Reaction score
71
I just attempted a commercial install with CPanel. it was not a success. Suggest you order a server without Cpanel.

Joe
 

HavocStyles

New Member
Joined
Apr 6, 2010
Messages
20
Reaction score
0
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?

Cheers,
Eric
 

jroper

Guru
Joined
Oct 20, 2007
Messages
3,832
Reaction score
71
Hi

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.

Joe
 

HavocStyles

New Member
Joined
Apr 6, 2010
Messages
20
Reaction score
0
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 =)
 

HavocStyles

New Member
Joined
Apr 6, 2010
Messages
20
Reaction score
0
That's how I learn, I break it and fix it a couple two three times lol ;)
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,201
Reaction score
5,220
All we'd ask is that, once you get it fixed, please document it for everyone else. ;)
 

esampathj

New Member
Joined
Apr 10, 2010
Messages
13
Reaction score
0
Can't see Freepbx admin page on the PIAF conrol panel

Hi,

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 ?

hiddenfeature.jpg
 

jroper

Guru
Joined
Oct 20, 2007
Messages
3,832
Reaction score
71
Hi

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

Check the install log in /root


Joe
 

Bitnetix

Guru
Joined
May 21, 2009
Messages
323
Reaction score
0
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.
 

Members online

No members online now.

Forum statistics

Threads
25,810
Messages
167,755
Members
19,240
Latest member
nikko
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top