Centos7安装杀毒软件ClamAV
Clam AntiVirus(ClamAV)是免费而且开放源代码的防毒软件,软件与病毒码的更新皆由社群免费发布。目前ClamAV主要是使用在Linux、FreeBSD等Unix-like系统架设的邮件服务器上,提供电子邮件的病毒扫描服务.
安装EPEL源
(http://www.cyberciti.biz/faq/installing-rhel-epel-repo-on-centos-redhat-7-x/)
Clamav可以通过EPEL源来安装,所以要首先安装EPEL,可以采用两种方法来安装:
第一种,通过命令行安装
[root@server_for_product ~]# yum install epel-release
第二种,使用下载好的安装包进行安装
[root@server_for_product ~]# cd /tmp
[root@server_for_product tmp]# wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
ls *.rpm
[root@server_for_product tmp]# yum install epel-release-7.noarch.rpm
刷新安装源并查看是否已经安装
[root@server_for_product ~]# yum repolist
看到以下字样就代表安装完成
epel/x86_64 Extra Packages for Enterprise Linux 7 - x86_64
查看EPEL源含有的安装包
[root@server_for_product ~]# yum --disablerepo="*" --enablerepo="epel" list available | less
安装ClamAV
在安装了EPEL源后,运行下面的命令安装ClamAV
[root@server_for_product ~]# yum install clamav-server clamav-data clamav-update clamav-filesystem clamav clamav-scanner-systemd clamav-devel clamav-lib clamav-server-systemd -y
在两个配置文件/etc/freshclam.conf和/etc/clamd.d/scan.conf中移除“Example”字符
[root@server_for_product ~]#sed -i -e “s/^Example/#Example/” /etc/freshclam.conf
[root@server_for_product ~]#sed -i -e “s/^Example/#Example/” /etc/clamd.d/scan.conf
手动更新病毒库
[root@server_for_product ~]# freshclam
顺便一提,freshclam命令通过文件/etc/cron.d/clamav-update来自动运行,该文件的内容
## Adjust this line...
MAILTO=root
## It is ok to execute it as root; freshclam drops privileges and becomes
## user 'clamupdate' as soon as possible
0 */3 * * * root /usr/share/clamav/freshclam-sleep
但默认情况下是禁止了自动更新功能,需要移除文件/etc/sysconfig/freshclam最后一行的配置才能启用
## Adjust this line...
MAILTO=root
## It is ok to execute it as root; freshclam drops privileges and becomes
## user 'clamupdate' as soon as possible
0 */3 * * * root /usr/share/clamav/freshclam-sleep
[root@server_for_product kylin]# ^C
[root@server_for_product kylin]# tail /etc/sysconfig/freshclam
## This option accepts two special values:
## 'disabled-warn' ... disables the automatic freshclam update and
## gives out a warning
## 'disabled' ... disables the automatic freshclam silently
# FRESHCLAM_DELAY=
### !!!!! REMOVE ME !!!!!!
### REMOVE ME: By default, the freshclam update is disabled to avoid
### REMOVE ME: network access without prior activation
FRESHCLAM_DELAY=disabled-warn # REMOVE ME
记得移除上面红色字体。
定义服务器类型(本地或者TCP),在这里定义为使用本地socket,将文件/etc/clam.d/scan.conf中的这一行前面的注释符号去掉:
#LocalSocket /var/run/clamd.scan/clamd.sock
配置开机启动
[root@server_for_product ~]# systemctl enable clamd@scan
[root@server_for_product ~]# ln -s ‘/usr/lib/systemd/system/clamd@scan.service’ ‘/etc/systemd/system/multi-user.target.wants/clamd@scan.service’
启动并检查服务状态
[root@server_for_product ~]# systemctl start clamd@scan
[root@server_for_product ~]# systemctl status clamd@scan
看到active字样就表示安装成功。
备注
如果在手动更新病毒库的时候遇到错误:Update failed. Your network may be down or none of the mirrors listed in freshclam.conf is working.
此时就要删除掉旧的镜像地址文件
[root@server_for_product ~]# rm -f /var/lib/clamav/mirrors.dat
再手动更新一次病毒库
[root@server_for_product ~]# freshclam
本文地址:http://www.linuxdiyf.com/linux/18635.html
Centos7安装杀毒软件ClamAV的更多相关文章
- ubantu 安装杀毒软件 clamav
前言: 搜索了一番安装杀毒软件的教程, 但是多有残缺不全的, 所以整理一下,以作记录 1. 添加用户 groupadd clamav useradd -g clamav -s /bin/false - ...
- Centos7下杀毒软件clamav的安装和使用
目录 一.yum安装 二.编译安装 2.1:下载软件包 2.2:创建clamav用户和存放病毒库目录 2.3:解压安装包 2.4:安装依赖 2.5:编译安装 2.6:配置clamav 2.7:启动cl ...
- (转)Centos7下杀毒软件clamav的安装和使用
本文转载自:https://www.cnblogs.com/bingo1024/p/9018212.html#_label1_0 目录 一.yum安装 二.编译安装 2.1:下载软件包 2.2:创建c ...
- centos 6.4安装杀毒软件clamAV 0.98[转]
原文出处: http://dnuser.blog.51cto.com/4863891/1303829 1.查看系统版本 [root@local]# lsb_release -a LSB Versi ...
- Linux下杀毒软件clamav的安装和使用
发表于:2017年6月30日 分类:Linux/Unix 最近发现有台服务器中毒了,手动去查杀总是会有遗漏,最后安装了Linux下的杀毒软件clamav,使用起来还是不错的. 环境:Linux 6 ...
- Linux 杀毒软件ClamAV安装部署
环境说明 系统安全需求,批量安装免费杀毒软件: 操作系统统一为CentOS 7 x64,在此选择免费开源杀毒软件ClamAV: 两种安装方式 1.yum 安装: 2.源码包编译安装: 安装参考网址: ...
- linux安装杀软 clamAV
ClamAV 是Linux平台最受欢迎的杀毒软件,ClamAV 属于免费的开源软件,支持多种平台.ClamAV是基于病毒扫描的命令行工具,但同时也有支持图形界面的ClamTK工具.ClamAV 主要用 ...
- HP服务器 hp 360g5 centos7安装问题
HP服务器 hp 360g5 centos7安装问题 一 :启动盘无法识别硬盘 1.进入安装光盘,用上下键选择安装centos--Install Centos7(注意不可按Enter键),如图: 2 ...
- CentOS7 安装Mono及Jexus
CentOS7安装Mono及Juxes 1 安装Mono 1.1 安装yum-utils 因为安装要用到yum-config-manager,默认是没有安装的,所以要先安装yum-utils包.命令如 ...
随机推荐
- http协议要点
概念: HTTP是Hyper Text Transfer Protocol(超文本传输协议)的缩写.它的发展是万维网协会(World Wide Web Consortium)和Internet工作小组 ...
- 3Com Network Supervisor与IBM Tivoli NetView两款网管软件操作视频
3Com Network Supervisor与IBM Tivoli NetView两款网管软件操作视频 网管软件必须能够实实在在的给我们带来好处,对于企业网络管理来说,其作用体现在以下几个方面: ...
- How to setup Wicket Examples in Eclipse
Wicket examples is a good place to learn Apache Wicket by examples, and a must reference site for ne ...
- c#动态加载dll文件
1.在写一个记录日志到文件中的类库(生成dll文件copy到一个目录中去,然后在主函数的appconfig中去配置. using System; using System.Collections.Ge ...
- LeetCode100:Same Tree
Given two binary trees, write a function to check if they are equal or not. Two binary trees are con ...
- oracle 空值与 null
Oracle中的空字符串基本上是被当成空NULL来处理的,我们可以从下面的得到印证. select nvl('','NULL') from dual 返回 'NULL' select ...
- heritrix启动问题修正
今天抽时间想看看其他蜘蛛的情况,于是下载了heritrix-1.14.2.搜索了一下相关的安装介绍.基本步骤如下: (1)解压下载的heritrix-1.14.2.zip的压缩包,如将其放在E:\da ...
- Mathematics for Computer Graphics数学在计算机图形学中的应用 [转]
最近严重感觉到数学知识的不足! http://bbs.gameres.com/showthread.asp?threadid=10509 [译]Mathematics for Computer Gra ...
- CSS3- px、em、rem区别介绍
PX px像素(Pixel).相对长度单位.像素px是相对于显示器屏幕分辨率而言的. PX特点 1. IE无法调整那些使用px作为单位的字体大小: 2. 国外的大部分网站能够调整的原因在于其使用了em ...
- svn 冲突解决
svn: E155015: Aborting commit: '$path + $file' remains in conflict 解决步骤 1.svn resolved 'file'执行后结果Re ...