Installing and Configuring ICAP on ClamAV: Difference between revisions

From Wiki
No edit summary
No edit summary
Line 9: Line 9:
2) run dnf
2) run dnf


  dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm -y
  <nowiki>dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm -y</nowiki>


3) Install Clamav packages
3) Install Clamav packages

Revision as of 13:32, 30 September 2024

Procedure

Install Packages on RHEL 9

1) Install EPEL Repository in RHEL 9

subscription-manager repos --enable codeready-builder-for-rhel-9-$(arch)-rpms

2) run dnf

dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm -y

3) Install Clamav packages

dnf -y install clamav clamav-data clamav-devel clamav-freshclamclamav-filesystem clamav-lib clamd

4) Install C-ICAP packages

dnf install c-icap c-icap-libs c-icap-modules -y

Step 2: Configure ClamAV

1) Update virus definition

freshclam

Save and exit the file

3) Start the ClamAV daemon:

sudo systemctl start clamav-freshclam


Step 3: Configure ICAP Server

1) Edit the ICAP server configuration file:

  sudo nano /etc/clamav-icap.conf

2) Make the following adjustments:**

# Bind to all interfaces (adjust if needed)
ListenAddress 0.0.0.0

# Set the port (default is 1344)
ListenPort 1344

# Set the service name (optional)
ServiceName clamav-icap
# Set the request method (default is "REQMOD")
RequestMethod REQMOD

# Set the request type (default is "CHECK")
RequestType CHECK

# Set the ICAP version (default is "1.0")
ICAPVersion 1.0

# Set the log level (0-5, higher values are more verbose)
LogLevel 3

# Set the log file (adjust if needed)
LogFile /var/log/clamav-icap.log

# Enable verbose logging (optional)
VerboseLog yes

Save and exit the file

Step 4: Start the ICAP Server

sudo systemctl start clamav-icap

Step 5: Verify Configuration

1) Check the ICAP server's status

sudo systemctl status clamav-icap

2) Ensure there are no errors in the log file

tail -f /var/log/clamav-icap.log


Ver também