Install
=======

**NOTES**: the following directories are which I use as an example:
    - WebCBQ: /var/www/html/webcbq
    - Apache Configuration: /etc/httpd/conf
    - CBQ.init: /sbin
    - ip and tc files: /sbin
    - CBQ.init rules files: /etc/sysconfig/cbq


1) Obtain and Copy WebCBQ
-------------------------

  a) To obtain WebCBQ go to:

         - http://sourceforge.net/projects/webcbq/

  b) Unpack and Copy WebCBQ to your work directory

       cd /path/where/you/download/it/
       tar -zxvf webcbq-x.y.tar.gz
       mkdir -p /var/www/html/webcbq
       chmod 644 /var/www/html/webcbq
       cp -r /path/where/you/download/it/webcbq /var/www/html/webcbq
       cd /var/www/html/webcbq

2) Configuration
----------------

  a) Edit "config.php" from where you copy WebCBQ files

       Here you configure the following:
         - Network interfaces on your machine
         - Language you would like to see in WebCBQ (english or spanish)
         - Directory where you save cbq.init rules files
         - Directory where you have cbq.init script

  b) Aggregates in apache config file

     cp /var/www/html/webcbq/webcbq.conf /etc/httpd/conf/
     vi /etc/httpd/conf/httpd.conf 
         (add the following line at the end:)
            Include /etc/httpd/conf/webcbq.conf

  c) Add the users that will be granted to access WebCBQ

     htpasswd -c /etc/httpd/conf/webcbq.passwd admin
         (enter the user password)

     htpasswd /etc/httpd/conf/webcbq.passwd AnotherUser
         (enter the user password)

  d) Change some directories permissions:

     chmod 755 /var/www/html/webcbq
     chown root:apache /etc/sysconfig/cbq
     chmod -R 775 /etc/sysconfig/cbq 

        *NOTE*: If you have rules files, YOU MUST add "P__" to the name or
                description.
                Ej.: cbq-1000.eth0  -->  cbq-1000.P__eth0

  e) THIS IS INSECURE BUT I COULD NOT FIND THE WAY TO RUN cbq.init AS ROOT.

     vi /etc/sudoers
         (add the following line at the end:)
          apache ALL = (ALL) NOPASSWD: /sbin/cbq.init,/sbin/tc,/sbin/ip

  f) Restart APACHE service
 
     /usr/sbin/apachectl restart

       (or)

     service httpd restart

3) Test
---------------

   Test enter to http://localhost/webcbq

4) PROBLEMS AND BUGS
--------------------

   Please submit bug reports at the project website

        http://sourceforge.net/projects/webcbq/

