Hi. I uploaded a version 1 of a How to guide for AMP on the SME Server. You can check it out at...
http://no.longer.valid/phpwiki/index.php/How%20to%20install%20AMP%3A%20the%20Asterisk%20Management%20Portal
David K.
I have followed a different approach: AMP running into its e-bay as user "amp", asterisk as user "asterisk" and Apache as user "www"; then all of them are placed into a common "astman" group. Here are the main steps (I might have forgotten some):
- Through the web server manager, create an "astman" group, with the Administrator part of it
- Through the web server manager, create an "amp" i-bay, part of the "astman" group,
with user access "read:group, write:group", Web access "Entire Internet (password required)"
Execution of dynamic content "enabled"
- Manually (using vi) add the user asterisk to the group "astman" in /etc/group
Now the html and cgi-bin under /home/e-smith/files/ibays/amp/ (seen from the web as "http://.../amp/") are owned by root but part of the astman group which has rw rights.
Untar AMP to /usr/src/AMP and follow the rest of the instructions inside INSTALL but replace occurrences of /var/www/ with /home/e-smith/files/ibays/amp/ , both in the instructions and inside:
/home/e-smith/files/ibays/amp/html/admin/cdr/lib/defines.php
/home/e-smith/files/ibays/amp/html/admin/bounce_op.sh
/home/e-smith/files/ibays/amp/html/admin/retrieve_op_conf_from_mysql.pl
/home/e-smith/files/ibays/amp/html/admin/vm_conf.php
/home/e-smith/files/ibays/amp/html/panel/op_server.cfg
/usr/sbin/amportal
/etc/init.d/asterisk
Also, in /home/e-smith/files/ibays/amp/html/index.html change /cgi-bin into ./cgi-bin, panel into ./panel and admin into ./admin
Before running "/usr/sbin/amportal start" (which sets various permissions), in /usr/sbin/amportal change chown_asterisk() as follows:
chown_asterisk() {
echo SETTING FILE PERMISSIONS
chown -R asterisk:astman /var/run/asterisk
chmod ug+rw /var/run/asterisk
chown -R asterisk:astman /etc/asterisk
chmod ug+rw /etc/asterisk
chown -R asterisk:astman /var/lib/asterisk
chmod ug+rw /var/lib/asterisk
chown -R asterisk:astman /var/log/asterisk
chmod ug+rw /var/log/asterisk
chown -R asterisk:astman /var/spool/asterisk
chmod ug+rw /var/spool/asterisk
chown -R asterisk:astman /dev/zap
chmod ug+rw /dev/zap
chown asterisk /dev/tty9
#chown -R asterisk:asterisk /var/www
chmod ug+x /var/lib/asterisk/agi-bin/*.agi
chmod ug+x /home/e-smith/files/ibays/amp/cgi-bin/*.cgi
chmod ug+x /home/e-smith/files/ibays/amp/html/admin/*.pl
chmod ug+x /home/e-smith/files/ibays/amp/html/admin/*.sh
chmod ug+x /home/e-smith/files/ibays/amp/html/panel/*.pl
echo Permissions OK
}
Now solve the issue with PEAR, installed in /usr/share/pear which is out of the open_basedir defined in /etc/e-smith/templates/etc/httpd/conf/httpd.conf/95AddType00PHP2ibays . Change:
"php_admin_value open_basedir $basedir\n";
to
"php_admin_value open_basedir $basedir:/usr/share/pear\n";
Then issue:
/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf
/etc/init.d/httpd restart
Finally, rename /etc/init.d/asterisk to /etc/init.d/asterisk-old and copy /usr/sbin/amportal to /etc/init.d/asterisk .
Enzo