Installation

License

Be sure to read the COPYING file included with this program. It explains that this is free software licensed under the GNU General Public License version 2. It also explains that the software comes with NO warranty, not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Dependencies

See Dependencies

  # apt-get install apache2 libapache2-mod-php5
  # apt-get install clamav clamav-freshclam php5-clamavlib
  # apt-get install mysql-server mysql-client php5-mysql

Important PHP Settings

  always_populate_raw_post_data = On
  memory_limit = 512M
  post_max_size = 32M
  file_uploads = On
  upload_max_filesize = 32M
  safe_mode = Off
  ; open_basedir

Make sure this doesn't have '-e' infront of extension=clamav.so

  extension=clamav.so
  [clamav]
  clamav.dbpath=/var/lib/clamav
  clamav.maxreclevel=0
  clamav.maxfiles=0
  clamav.archivememlim=0
  clamav.maxfilesize=0
  clamav.maxratio=0

Restart Apache for the changes to take Effect

  # /etc/init.d/apache2 stop
  # /etc/init.d/apache2 start

Database Setup

  $ mysql -u root -p
  mysql> CREATE DATABASE gatewayav;
  mysql> USE gatewayav;
  mysql> CREATE USER gatewayav IDENTIFIED BY 'secret';
  mysql> GRANT ALL ON *.* TO gatewayav;
  mysql> FLUSH PRIVILEGES;

Configure Gateway Anti-Virus

  $ tar zvxf gatewayav-x.y.tar.gz
  $ cd gatewayav-x.y
  $ nano ./src/config.php

Install Gateway Anti-Virus

  # mkdir /var/www/gatewayav
  # cp -R ./src/* /var/www/gatewayav
  # chown -R www-data:www-data /var/www/gatewayav

Testing

  $ cd ./dbsetup
  $ php adduser.php guest secret
  $ cd ./test
  $ php client.php

Then visit http://localhost/gatewayav/VirusCheckStats.php