[Asterisk-Dev] Multi asterisk installation

Tzafrir Cohen tzafrir.cohen at xorcom.com
Tue May 3 07:47:36 MST 2005


On Tue, May 03, 2005 at 04:30:07PM +0200, Marcin Pietrzyk wrote:
> 
> On 03/05/2005 at 13:18 Tzafrir Cohen wrote:
> 
> >Just give each Asterisk instance its own directory.
> >
> >If you want to run it as non-root, you'd probably want to create the pid
> >file and the socket in a separate subdirectory under /var/run . 
> >
> >Here is asterisk.conf from debian:
> >
> >[global]
> >	astetcdir => /etc/asterisk
> >	astmoddir => /usr/lib/asterisk/modules
> >	astvarlibdir => /var/lib/asterisk
> >	; in debian software lives under /usr 
> >	astagidir => /usr/share/asterisk/agi-bin
> >	astspooldir => /var/spool/asterisk
> >	astrundir => /var/run/asterisk
> >	astlogdir => /var/log/asterisk
> >
> >Replace each /asterisk$ in that file with a custom directory for your
> >instance, owned by the user of that instance.
> 
> Ok. right i will test this solution, and report is it working. Have 
> anyone tried this ? Or tried to :-)
> 
> But still even if its working this solution leads to having 2 
> instalation of asterisk in different directories, any ideas of running 
> two times the same asterisk with two different configs ?

You can use a single asterisk binary, modules (and agi directory, if you
so wish). 

Run those asterisk instances as two different users, and not as root.
Don't chmod 666 or 777.
That way you'll immediately get permission errors about any problem, and
you'll be sure that those two copies don't run over one-another's data.

-- 
Tzafrir Cohen     icq#16849755  +972-50-7952406
tzafrir.cohen at xorcom.com  http://www.xorcom.com



More information about the asterisk-dev mailing list