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包.命令如 ...
随机推荐
- home-brew 安装&下载
安装: ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)&qu ...
- html5 canvas防微博旋转
<!doctype html> <html> <head> <meta charset="utf-8"> <title> ...
- Spark RDD概念学习系列之RDD的转换(十)
RDD的转换 Spark会根据用户提交的计算逻辑中的RDD的转换和动作来生成RDD之间的依赖关系,同时这个计算链也就生成了逻辑上的DAG.接下来以“Word Count”为例,详细描述这个DAG生成的 ...
- Cisco SDM
SDM连接方式:http+telnet / https+ssh 要使用SDM对CISCO设备实现集中式管理,必须在设备上键入如下命令: 步骤1: 要启用路由器的HTTP/HTTPS 服务器,请 ...
- 根据路径获得文件名以及Aspose.Cells.dll操作excel 以及使用iTextSharp.text.pdf.PdfReader.dll对PDF的操作
string result = Regex.Match(str,@"[^\\]+$").Value;//正则表达式 this.listBox1.Items.Add(Path.Get ...
- .net 学习资源(转)
名称:快速入门地址:http://chs.gotdotnet.com/quickstart/描述:本站点是微软.NET技术的快速入门网站,我们不必再安装.NET Framework中的快速入门示例 ...
- Java Service Wrapper配置详解
#encoding=UTF-8 # Configuration files must begin with a line specifying the encoding # of the the fi ...
- android 动画属性(一)之Animation
Animation 在android 程序当中很多时候要用到动画效果,而动画效果主要是Animation来实现的,API给出的解释: 其中包含4种动画效果 AlphaAnimation 渐变透明度 R ...
- 转载:DIV+CSS有可能遇到的问题
[总结]DIV+CSS有可能遇到的问题 一.超链接访问过后hover样式就不出现的问题? 被点击访问过的超链接样式不在具有hover和active了,解决方法是改变CSS属性的排列顺序: L-V-H- ...
- linux 安装Apache----tar.gz文件安装方式(零环境安装)
一.下载apache源代码 1.下载地址:http://httpd.apache.org/download.cgi 找稳定的最新的版本(Stable Release) 得到文件 httpd-2.4. ...