Avantfax 3.3.3 install

Discussion in 'General' started by franklin, Mar 5, 2011.

  1. franklin

    Joined:
    Oct 22, 2010
    Messages:
    254
    Likes Received:
    0
    dicko,

    Trying to put Avantfax on 3.3.3 on a box. I have downloaded 3.3.3 onto my PC. Hard to know where to start.

    I want to verify I have a working installation of the following:

    * HylaFAX 4.4, HylaFAX 6, or HylaFAX EE 3 & 4
    * PHP 5
    * PHP PEAR 5 including MDB2_driver_mysql, Mail and Mail_Mime
    * PHP mbstring - for improved UTF-8 sorting support (optional)
    * PHP MySQL 5
    * MySQL server 4.1.12 or better (see Important Notes below)
    * Apache
    * ImageMagick
    * ghostscript
    * libtiff
    * netpbm-progs
    * libungif
    * sudo
    * sendmail/postfix/exim/qmail or use an external SMTP server
    * cups/lpr and psutils


    Could you help me out? The $495 for their pro install is a little steep. Thanks.
     
  2. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    Maybe Ramon will update his RPM someday to suit the somewhat nearly functional Elastix 2.? but unless you really need it "embedded" ( I doubt it) then just do it the Avantfax way and it will be at http://<your_ip>/avantfax unless you edit the rh install script, which you should anyway to suit locale of date, language and paper size etc. . It depends of course on how much your users use the Elastix interface, IMHO opinion, STILL much of it does not work like the Panel or FAX, or is too trivial to use like the Calendar etc. YMMV of course look at Ramon's original install script (not the RPM) and edit it to suit the latest versions of stuff;) :)
     
  3. franklin

    Joined:
    Oct 22, 2010
    Messages:
    254
    Likes Received:
    0
    Sorry to be obtuse. But I get

    # rh-install.sh
    -bash: rh-install.sh: command not found
     
  4. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    you will need to give a full path to the script, if you are in the directory where it is, then

    ./rh-install.sh

    will suffice.
     
  5. franklin

    Joined:
    Oct 22, 2010
    Messages:
    254
    Likes Received:
    0
    I found this under a Spanish language thread. Looks good so far. I WinSCPd 3.3.3 into usr/src and then (changing 3.1.6 to 3.3.3) Have the rest of the directions to follow...

    tar xfvz avantfax-3.1.6.tgz
    cd avantfax-3.1.6

    # Change preferences to work with Elastix
    mv rh-prefs.txt rh-prefs.txt.`date +%Y-%m-%d-%Hh%Mm`
    echo "FAXDOMAIN=fax.elastix.org" >> rh-prefs.txt
    echo "INSTDIR=/var/www/html/avantfax" >> rh-prefs.txt
    echo "HYLADIR=/usr" >> rh-prefs.txt
    echo "SPOOL=/var/spool/hylafax" >> rh-prefs.txt
    echo "USER=avantfax" >> rh-prefs.txt
    echo "PASS=d58fe49" >> rh-prefs.txt
    echo "DB=avantfax" >> rh-prefs.txt
    echo "ROOTMYSQLPWD=eLaStIx.2oo7" >> rh-prefs.txt
    echo "HTTPDUSER=asterisk" >> rh-prefs.txt
    echo "HTTPDGROUP=asterisk" >> rh-prefs.txt

    # Run the installation scripts
    chmod +x rh-install.sh
    ./rh-install.sh
     
  6. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    As I should have said, please investigate

    rh-prefs.txt

    after the changes made by anyone, this file will "define" you before the install,but it is well self documented

    if it was modified by Ramon or another "Spanish Speaker" ;) then you might well be using spanish and A4 paper and strange Date/time formats . . .

    Absolutely no disregard to Ramon, he remains my hero, even if he won't marry me :) :) (don't worry, just a very old joke of ours)
     
  7. franklin

    Joined:
    Oct 22, 2010
    Messages:
    254
    Likes Received:
    0
    When I get to step 5 I have trouble. It says:

    5- Make your AvantFAX database. At the prompt, enter your MySQL root password.

    Example:

    # mysql -uroot -p < create_user.sql
    # mysql -uavantfax -pd58fe49 avantfax < create_tables.sql

    I get the following bash error:

    ]# mysql -uroot -p < create_user.sql
    -bash: create_user.sql: No such file or directory

    and

    # mysql -uavantfax -pd58fe49 avantfax < create_tables.sql
    -bash: create_tables.sql: No such file or directory
     
  8. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    Again it's a matter of path

    you need to run the script within the directory where

    create_user.sql

    and


    create_tables.sql

    are or modify the script to suit.

    updatedb; locate create*.sql

    might help you find where you put them
     
  9. franklin

    Joined:
    Oct 22, 2010
    Messages:
    254
    Likes Received:
    0
    shiite.

    # updatedb; locate create*.sql
    returned nothing:
    [root@elastix avantfax]#

    Lost.
     
  10. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    my apologies . . .

    specifically:

    locate create_user.sql

    and

    locate create_tables.sql
     
  11. franklin

    Joined:
    Oct 22, 2010
    Messages:
    254
    Likes Received:
    0
    # locate create_user.sql
    returned
    /usr/src/avantfax-3.3.3/create_user.sql

    # locate create_tables.sql
    returned
    /usr/src/avantfax-3.3.3/create_tables.sql

    When I go
    [root@elastix avantfax-3.3.3]# mysql -uroot -p < create_user.sql
    Enter password: <tried many, even eLaStIx.2oo7, and I get>
    ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
     
  12. franklin

    Joined:
    Oct 22, 2010
    Messages:
    254
    Likes Received:
    0
    [root@elastix avantfax-3.3.3]# mysql -uroot -p < create_user.sql
    Enter password:<eLaStIx.2oo7 gives me this>
    ERROR 1146 (42S02) at line 8: Table 'mysql.procs_priv' doesn't exist


    [root@elastix avantfax-3.3.3]# mysql -uroot -p < create_user.sql
    Enter password:<eLaStIx.2007 or any other word gives me this>
    ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
     
  13. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    Yep, sounds like creaky old Elastix, boy does this get old . . .

    try:


    mysql_fix_privilege_tables --password=<rootpassword>

    p.s.

    your mysql root password is NOT

    eLaStIx.2007

    and never has been, it is

    eLaStIx.2oo7
     
  14. franklin

    Joined:
    Oct 22, 2010
    Messages:
    254
    Likes Received:
    0
    from 3.3.3 and the root:

    [root@elastix avantfax-3.3.3]# mysql_fix_privilege_tables --password=<rootpassword>
    -bash: syntax error near unexpected token `newline'
    [root@elastix avantfax-3.3.3]# cd
    [root@elastix ~]# mysql_fix_privilege_tables --password=<rootpassword>
    -bash: syntax error near unexpected token `newline'
     
  15. franklin

    Joined:
    Oct 22, 2010
    Messages:
    254
    Likes Received:
    0
    I did do this with Ramon's script before using the Avantfax routine:

    # Change preferences to work with Elastix
    mv rh-prefs.txt rh-prefs.txt.`date +%Y-%m-%d-%Hh%Mm`
    echo "FAXDOMAIN=fax.elastix.org" >> rh-prefs.txt
    echo "INSTDIR=/var/www/html/avantfax" >> rh-prefs.txt
    echo "HYLADIR=/usr" >> rh-prefs.txt
    echo "SPOOL=/var/spool/hylafax" >> rh-prefs.txt
    echo "USER=avantfax" >> rh-prefs.txt
    echo "PASS=d58fe49" >> rh-prefs.txt
    echo "DB=avantfax" >> rh-prefs.txt
    echo "ROOTMYSQLPWD=eLaStIx.2oo7" >> rh-prefs.txt
    echo "HTTPDUSER=asterisk" >> rh-prefs.txt
    echo "HTTPDGROUP=asterisk" >> rh-prefs.txt

    Looks like I changed the user and pass
     
  16. franklin

    Joined:
    Oct 22, 2010
    Messages:
    254
    Likes Received:
    0
    So it looks like I already have the user created.

    [root@elastix avantfax-3.3.3]# # mysql -uavantfax -pd58fe49 avantfax < create_tables.sql

    Produced no error:

    [root@elastix avantfax-3.3.3]#

    Moving on...
     
  17. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    please replace <rootpassword> (my aplogies for not making that totally clear, whenever we say <something> you need to replace it with your REAL thing), with YOUR root password, this will normally be eLaStIx.2oo7 and NOT eLaStIx.2007, please notice the difference.
     
  18. franklin

    Joined:
    Oct 22, 2010
    Messages:
    254
    Likes Received:
    0
    This is what is ending up in etc/crond.d/avantfax

    0 0 * * * /var/www/html/avantfax/includes/avantfaxcron.php -t 2
    # runs once an hour to update the phone book
    0 * * * * /var/www/avantfax/includes/phb.php
    # runs once a day to remove old files
    0 0 * * * /var/www/avantfax/includes/avantfaxcron.php -t 2
     
  19. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    When you run that script ineffectively, you might well need to tidy up the files it produced to prevent duplicates and redundancies,

    All the file touched by the script including all the

    /var/spool/hylafax/etc/config.ttyIAX*

    might need pruning, caveat implementor :)

    That you managed to vreate

    /var/www/avantfax

    might well be a problem, the html docroot is /var/www/html/ not /var/www you should probably start over again after deleteing all the dross and applying due diligence, be careful of the avantfax http config file in /etc/httpd/conf.d/ or it will override your Elastix https rewrite rules
     
  20. franklin

    Joined:
    Oct 22, 2010
    Messages:
    254
    Likes Received:
    0
    Aye calbron.

    At step 7- Comment out "Defaults requiretty" and add an entry for Apache to add and delete fax users, and to halt and reboot the server via sudo.

    "Example:

    # visudo
    #Defaults requiretty

    apache ALL = NOPASSWD: /sbin/reboot, /sbin/halt,
    /usr/sbin/faxdeluser, /usr/sbin/faxadduser -u * -p * *"

    At my prompt I type visudo, and then paste the example:

    I get an error when I try to save:

    [root@elastix includes]# visudo
    >>> /etc/sudoers: syntax error near line 114 <<<
    >>> /etc/sudoers: syntax error near line 114 <<<
    visudo: Warning: unused Cmnd_Alias DELEGATING
    visudo: Warning: unused Cmnd_Alias DRIVERS
    visudo: Warning: unused Cmnd_Alias LOCATE
    visudo: Warning: unused Cmnd_Alias NETWORKING
    visudo: Warning: unused Cmnd_Alias PROCESSES
    visudo: Warning: unused Cmnd_Alias SERVICES
    visudo: Warning: unused Cmnd_Alias SOFTWARE
    visudo: Warning: unused Cmnd_Alias STORAGE
    What now? x
    [root@elastix includes]#
     

Share This Page