1# Basic guide to Installing and Updating on Ubuntu / Debian 2Run the following as root 3 4# UPGRADE INSTRUCTIONS (version 7.0 +) 5``` 6clamav-unofficial-sigs.sh --upgrade 7clamav-unofficial-sigs.sh --force 8``` 9 10# UPGRADE INSTRUCTIONS (version 6.1 and below) 11``` 12wget https://raw.githubusercontent.com/extremeshok/clamav-unofficial-sigs/master/clamav-unofficial-sigs.sh -O /usr/local/sbin/clamav-unofficial-sigs.sh && chmod 755 /usr/local/sbin/clamav-unofficial-sigs.sh 13wget https://raw.githubusercontent.com/extremeshok/clamav-unofficial-sigs/master/config/master.conf -O /etc/clamav-unofficial-sigs/master.conf 14clamav-unofficial-sigs.sh --force 15``` 16 17# CLAMAV INSTALL INSTRUCTIONS 18# Install clamav 19``` 20apt-get update && apt-get install -y clamav-base clamav-freshclam clamav clamav-daemon 21``` 22 23## Make sure you do not have the package installed via apt 24``` 25apt-get purge -y clamav-unofficial-sigs 26``` 27 28## Install 29Run the following commands in shell (console/terminal) 30``` 31mkdir -p /usr/local/sbin/ 32wget https://raw.githubusercontent.com/extremeshok/clamav-unofficial-sigs/master/clamav-unofficial-sigs.sh -O /usr/local/sbin/clamav-unofficial-sigs.sh && chmod 755 /usr/local/sbin/clamav-unofficial-sigs.sh 33mkdir -p /etc/clamav-unofficial-sigs/ 34wget https://raw.githubusercontent.com/extremeshok/clamav-unofficial-sigs/master/config/master.conf -O /etc/clamav-unofficial-sigs/master.conf 35wget https://raw.githubusercontent.com/extremeshok/clamav-unofficial-sigs/master/config/user.conf -O /etc/clamav-unofficial-sigs/user.conf 36``` 37Select your operating system config from https://github.com/extremeshok/clamav-unofficial-sigs/tree/master/config/ 38**replace os.debian9.conf with your required config, ubuntu = os.ubuntu.conf, debian10 = os.debian.conf, debian9 = os.debian.conf, debian8 = os.debian8.conf, debian8-systemd = os.debian8.systemd.conf, debian7 = os.debian7.conf** 39``` 40os_conf="os.debian.conf" 41wget "https://raw.githubusercontent.com/extremeshok/clamav-unofficial-sigs/master/config/os/${os_conf}" -O /etc/clamav-unofficial-sigs/os.conf 42``` 43 44### Optional: configure your user config /etc/clamav-unofficial-sigs/user.conf 45 46## RUN THE SCRIPT ONCE AS ROOT 47ensure there are no errors, fix any missing dependencies 48script must run once as your superuser to set all the permissions and create the relevant directories 49``` 50/usr/local/sbin/clamav-unofficial-sigs.sh --force 51``` 52 53### Install logrotate and Man files 54``` 55/usr/local/sbin/clamav-unofficial-sigs.sh --install-logrotate 56/usr/local/sbin/clamav-unofficial-sigs.sh --install-man 57``` 58 59### Install Systemd configs or use cron 60#### cron 61``` 62/usr/local/sbin/clamav-unofficial-sigs.sh --install-cron 63``` 64### OR 65#### systemd 66``` 67mkdir -p /etc/systemd/system/ 68wget https://raw.githubusercontent.com/extremeshok/clamav-unofficial-sigs/master/systemd/clamav-unofficial-sigs.service -O /etc/systemd/system/clamav-unofficial-sigs.service 69wget https://raw.githubusercontent.com/extremeshok/clamav-unofficial-sigs/master/systemd/clamav-unofficial-sigs.timer -O /etc/systemd/system/clamav-unofficial-sigs.timer 70 71systemctl enable clamav-unofficial-sigs.service 72systemctl enable clamav-unofficial-sigs.timer 73systemctl start clamav-unofficial-sigs.timer 74 75``` 76