1.下载
官网地址:
http://www.clamav.net/download.html
2.安装先决条件
介绍文档地址:https://docs.clamav.net/
yum install -y epel-release yum install -y dnf-plugins-core yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm #install tools yum install -y gcc gcc-c++ make python3 python3-pip valgrind yum install -y bzip2-devel check-devel json-c-devel libcurl-devel libxml2-devel yum install -y ncurses-devel openssl-devel pcre2-devel sendmail-devel zlib-devel
yum config-manager --set-enabled powertools | true
python3 -m pip install --user cmake pytest docker 容器:python3 -m pip install cmake pytest
3.安装
解压:
tar -zxvf clamav-0.104.2.tar.gz cd clamav-0.104.2
编译:
#创建build文件,如果编译出现问题,可以轻松删除并重新构建文件 mkdir build && cd build
编译安装
#默认 cmake .. cmake --build . ctest sudo cmake --build . --target install
cmake ..
-D CMAKE_INSTALL_PREFIX=/usr
-D CMAKE_INSTALL_LIBDIR=lib
-D APP_CONFIG_DIRECTORY=/etc/clamav
-D DATAbase_DIRECTORY=/var/lib/clamav
-D ENABLE_JSON_SHARED=OFF
更新病毒库:
cd /usr/local/bin/freshclam ./freshclam
出现错误:
root@localhost bin]# ./freshclam ERROR: Can't open/parse the config file /usr/local/etc/freshclam.conf
cd /usr/local/etc/
ls -lrt #查看文件属主
chown
扫描操作
cd /usr/local/bin/ ./clamscan -r /



