Translate
idarzh-TWen

Install ClamAV di Centos 8

ClamAV antivirus merupakan salah satu antivirus gratis untuk linux. Meskipun gratis, clamav merupakan antivirus yang tidak kalah powerfull dengan lainnya. ClamAV memiliki 2 (dua) service yang berjalan yaitu "clamscan" dan "clamdscan". Perbedaan yang mencolok adalah waktu proses scanning. Service "clamdscan" memiliki waktu relatif lebih singkat daripada service "clamscan". Pada artikel ini saya akan membahas tentang instalasi ClamAV di CentOS 8. Untuk langkah nya simak video dibawah ini :

Watch the video
Linux

Install ClamAV di Centos 8

ClamAV antivirus merupakan salah satu antivirus gratis untuk linux. Meskipun gratis, clamav merupakan antivirus yang tidak kalah powerfull dengan lainnya. ClamAV memiliki 2 (dua) service yang berjalan yaitu "clamscan" dan "clamdscan". Perbedaan yang mencolok adalah waktu proses scanning. Service "clamdscan" memiliki waktu relatif lebih singkat daripada service "clamscan". Pada artikel ini saya akan membahas tentang instalasi ClamAV di CentOS 8. Untuk langkah nya simak video dibawah ini :

Read More
( 0 / 0 votes)
Star InactiveStar InactiveStar InactiveStar InactiveStar Inactive
 

Berikut langkah2 instalasinya : 


// Update CentOS 8 : 
[root@localhost ~]# yum update
==========================
// Install EPEL terakhir untuk RHEL / CentOS 
[root@localhost ~]# yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
==============================================================================
// Install CLAMAV 
[root@localhost ~]# yum -y install clamav-server clamav-data clamav-update clamav-filesystem clamav clamav-scanner-systemd clamav-devel clamav-lib clamav-server-systemd
=========================================================================================================================================
// Aktifkan service Clamav di SELinux
[root@localhost ~]# setsebool -P antivirus_can_scan_system 1
================================================
[root@localhost ~]# setsebool -P clamd_use_jit 1 
======================================
// Cek service di SELinux, hasilnya seperti dibawah ini
[root@localhost ~]# getsebool -a | grep antivirus
antivirus_can_scan_system --> on
antivirus_use_jit --> on
==============================================
// Backup konfigurasi scan.conf -- scan.conf.backup 
[root@localhost ~]# cp /etc/clamd.d/scan.conf /etc/clamd.d/scan.conf.backup
============================================================
// Kosongkan konfigurasi scan.conf
[root@localhost ~]# echo " " > /etc/clamd.d/scan.conf
============================================================
// Ubah konfigurasi scan.conf seperti dibawah ini :
[root@localhost ~]# nano " " > /etc/clamd.d/scan.conf
#Automatically Generated by clamav-daemon postinst
AlgorithmicDetection true
AllowAllMatchScan true
ArchiveBlockEncrypted false
BytecodeSecurity Paranoid
BytecodeTimeout 60000
Bytecode true
CommandReadTimeout 5
#CrossFilesystems true
DatabaseDirectory /var/lib/clamav
Debug false
#DetectBrokenExecutables false
DetectBrokenExecutables true
DetectPUA false
DisableCache false
DisableCertCheck false
ExitOnOOM false
ExtendedDetectionInfo true
FixStaleSocket true
FollowDirectorySymlinks false
FollowFileSymlinks true
ForceToDisk false
Foreground false
HeuristicScanPrecedence false
IdleTimeout 30
LeaveTemporaryFiles false
LocalSocketGroup clamscan
LocalSocketMode 666
LocalSocket /var/run/clamd.scan/clamd.ctl
#LogClean false
#LogFacility LOG_LOCAL6
#LogFileMaxSize 0
#LogFileUnlock false
#LogFile /var/log/clamav/clamav.log
#LogRotate true
LogSyslog true
LogTime true
LogVerbose false
MaxConnectionQueueLength 15
MaxDirectoryRecursion 15
MaxEmbeddedPE 10M
MaxFiles 10000
MaxFileSize 25M
MaxHTMLNormalize 10M
MaxHTMLNoTags 2M
MaxIconsPE 100
MaxPartitions 50
MaxQueue 100
MaxRecHWP3 16
MaxRecursion 16
MaxScanSize 100M
MaxScriptNormalize 5M
MaxThreads 12
MaxZipTypeRcg 1M
OfficialDatabaseOnly false
OLE2BlockMacros false
OnAccessIncludePath /home
OnAccessMaxFileSize 5M
PartitionIntersection false
PCREMatchLimit 10000
PCREMaxFileSize 25M
PCRERecMatchLimit 5000
PhishingAlwaysBlockCloak false
PhishingAlwaysBlockSSLMismatch false
PhishingScanURLs true
PhishingSignatures true
ReadTimeout 180
ScanArchive true
ScanELF true
ScanHTML true
ScanHWP3 true
ScanMail true
ScanOLE2 true
ScanOnAccess true
ScanPartialMessages false
ScanPDF true
ScanPE true
ScanSWF true
ScanXMLDOCS true
SelfCheck 3600
SendBufTimeout 200
#StatsEnabled false
#StatsHostID auto
#StatsPEDisabled false
#StatsTimeout 10
StreamMaxLength 25M
StructuredDataDetection false
User clamscan
======================================================================
// Backup konfigurasi freshclam.conf menjadi freshclam.conf.backup
[root@localhost ~]# cp /etc/freshclam.conf /etc/freshclam.conf.backup 
=======================================================
// Kosongkan konfigurasi freshclam.conf
[root@localhost ~]# echo " " > /etc/freshclam.conf
======================================================
// Ubah konfigurasi freshclam.conf seperti dibawah ini :
[root@localhost ~]# nano /etc/freshclam.conf
# Automatically created by the clamav-freshclam postinst
Bytecode true
CompressLocalDatabase no
ConnectTimeout 30
DatabaseDirectory /var/lib/clamav
DatabaseMirror database.clamav.net
DatabaseMirror db.local.clamav.net
DatabaseMirror db.us.clamav.net
DatabaseOwner clamupdate
Debug false
DNSDatabaseInfo current.cvd.clamav.net
Foreground false
#LogFacility LOG_LOCAL6
#LogFileMaxSize 0
#LogRotate true
LogSyslog false
LogTime true
LogVerbose false
MaxAttempts 5
NotifyClamd /etc/clamd.d/clamd.conf
ReceiveTimeout 30
SafeBrowsing true
ScriptedUpdates yes
TestDatabases yes
#UpdateLogFile /var/log/clamav/freshclam.log
==============================================================
// Backup konfigurasi clamd@scan.service menjadi clamd@scan.service.backup
[root@localhost ~]# cp /usr/lib/systemd/system/clamd@scan.service /usr/lib/systemd/system/clamd@scan.service.backup
==============================================================================================
// Kosongkan konfigurasi clamd@scan.service
[root@localhost ~]# echo " " > /usr/lib/systemd/system/clamd@scan.service
===========================================================
// Ubah konfigurasi clamd@scan.service seperti dibawah ini
[root@localhost ~]# nano /usr/lib/systemd/system/clamd@scan.service
.include /lib/systemd/system/clamd.service
===========================================================
// Backup service clamd@.service dan Buat konfigurasi clamd.service seperti dibawah ini :
[root@localhost ~]# cp /usr/lib/systemd/system/clamd@.service /usr/lib/systemd/system/clamd.service
================================================================================
// Ubah konfigurasi clamd.service seperti dibawah ini :
[root@localhost ~]# nano /usr/lib/systemd/system/clamd.service
# Run the clamd scanner
[Unit]
Description = clamd scanner (%i) daemon
After = syslog.target nss-lookup.target network.target

[Service]
Type = simple
ExecStart = /usr/sbin/clamd --foreground=yes
Restart = on-failure
IOSchedulingPriority = 7
CPUSchedulingPolicy = 5
Nice = 19
PrivateTmp = true
MemoryLimit=500M
CPUQuota=50%

[Install]
WantedBy = multi-user.target
=================================================================================================
// Backup konfigurasi clam-freshclam.service menjadi clam-freshclam.service.backup
[root@localhost ~]# cp /usr/lib/systemd/system/clam-freshclam.service /usr/lib/systemd/system/clam-freshclam.service.backup 
=================================================================================================
// Kosongkan konfigurasi clam-freshclam.service
[root@localhost ~]# echo " " > /usr/lib/systemd/system/clam-freshclam.service
===============================================================
// Ubah konfigurasi clam-freshclam.service seperti dibawah ini :
[root@localhost ~]# nano /usr/lib/systemd/system/clam-freshclam.service
# Run the freshclam as daemon
[Unit]
Description = freshclam scanner
After = network.target

[Service]
Type = forking
ExecStart = /usr/bin/freshclam -d
Restart = on-failure
IOSchedulingPriority = 7
CPUSchedulingPolicy = 5
Nice = 19
PrivateTmp = true

[Install]
WantedBy = multi-user.target
===========================================================================================
// update clamav, jika sukses maka tampilan akan seperti ini : 
[root@localhost ~]# freshclam
Fri Oct 11 21:57:20 2019 -> ClamAV update process started at Fri Oct 11 21:57:20 2019
Fri Oct 11 21:57:21 2019 -> main.cvd is up to date (version: 58, sigs: 4566249, f-level: 60, builder: sigmgr)
Fri Oct 11 22:01:41 2019 -> Downloading daily-25551.cdiff [100%]
Fri Oct 11 22:01:42 2019 -> Downloading daily-25552.cdiff [100%]
Fri Oct 11 22:01:42 2019 -> Downloading daily-25553.cdiff [100%]
Fri Oct 11 22:01:42 2019 -> Downloading daily-25554.cdiff [100%]
Fri Oct 11 22:01:43 2019 -> Downloading daily-25555.cdiff [100%]
Fri Oct 11 22:02:14 2019 -> Downloading daily-25556.cdiff [100%]
Fri Oct 11 22:02:15 2019 -> Downloading daily-25557.cdiff [100%]
.
.
.
.
Fri Oct 11 22:06:10 2019 -> Downloading daily-25598.cdiff [100%]
Fri Oct 11 22:06:18 2019 -> Downloading daily-25599.cdiff [100%]
Fri Oct 11 22:14:37 2019 -> daily.cld updated (version: 25599, sigs: 1911653, f-level: 63, builder: raynman)
Fri Oct 11 22:14:38 2019 -> *Can't query daily.25599.105.1.0.6810DB54.ping.clamav.net
Fri Oct 11 22:15:33 2019 -> Downloading safebrowsing.cvd [100%]
Fri Oct 11 22:15:41 2019 -> safebrowsing.cvd updated (version: 49109, sigs: 2217361, f-level: 63, builder: google)
Fri Oct 11 22:15:42 2019 -> *Can't query safebrowsing.49109.105.1.0.6810DB54.ping.clamav.net
Fri Oct 11 22:15:42 2019 -> Downloading bytecode-331.cdiff [100%]
Fri Oct 11 22:15:42 2019 -> bytecode.cld updated (version: 331, sigs: 94, f-level: 63, builder: anvilleg)
Fri Oct 11 22:15:43 2019 -> *Can't query bytecode.331.105.1.0.6810DB54.ping.clamav.net
Fri Oct 11 22:15:52 2019 -> Database updated (8695357 signatures) from database.clamav.net (IP: 104.16.219.84)
Fri Oct 11 22:15:52 2019 -> !NotifyClamd: Can't find or parse configuration file /etc/clamd.d/clamd.conf
==========================================================================================
// Jalankan service clamscan  
[root@localhost ~]# systemctl start clam-freshclam.service 
=================================================================
// Cek status service clamscan, jika benar maka akan tampil seperti dibawah ini :  
[root@localhost ~]#  systemctl status clam-freshclam.service
● clam-freshclam.service - freshclam scanner
   Loaded: loaded (/usr/lib/systemd/system/clam-freshclam.service; disabled; ve>
   Active: active (running) since Thu 2019-10-17 14:20:59 WIB; 7s ago
  Process: 6086 ExecStart=/usr/bin/freshclam -d (code=exited, status=0/SUCCESS)
 Main PID: 6087 (freshclam)
    Tasks: 1 (limit: 24022)
   Memory: 1.3M
   CGroup: /system.slice/clam-freshclam.service
           └─6087 /usr/bin/freshclam -d

Oct 17 14:20:59 localhost.localdomain systemd[1]: Starting freshclam scanner...
Oct 17 14:20:59 localhost.localdomain systemd[1]: Started freshclam scanner.
=================================================================
// Enable service clamdscan (daemon)
[root@localhost ~]# systemctl enable clamd@scan.service 
Created symlink /etc/systemd/system/multi-user.target.wants/clamd@scan.service → /usr/lib/systemd/system/clamd@scan.service.
=====================================================================================================
// Jalankan service clamdscan (daemon)
[root@localhost ~]# systemctl start clamd@scan.service 
========================================================================
// Cek status service clamdscan (daemon), jika benar maka akan tampil seperti dibawah ini : 
[root@localhost ~]# systemctl status clamd@scan.service 
● clamd@scan.service - Generic clamav scanner daemon
   Loaded: loaded (/usr/lib/systemd/system/clamd@scan.service; enabled; vendor >
   Active: active (running) since Thu 2019-10-17 14:21:30 WIB; 5s ago
 Main PID: 6094 (clamd)
    Tasks: 1 (limit: 24022)
   Memory: 91.5M (limit: 500.0M)
   CGroup: /system.slice/system-clamd.slice/clamd@scan.service
           └─6094 /usr/sbin/clamd --foreground=yes

Oct 17 14:21:30 localhost.localdomain systemd[1]: Stopped Generic clamav scanne>
Oct 17 14:21:30 localhost.localdomain systemd[1]: Started Generic clamav scanne>
Oct 17 14:21:30 localhost.localdomain clamd[6094]: WARNING: Ignoring deprecated>
Oct 17 14:21:30 localhost.localdomain clamd[6094]: Received 0 file descriptor(s>
Oct 17 14:21:30 localhost.localdomain clamd[6094]: clamd daemon 0.101.4 (OS: li>
Oct 17 14:21:30 localhost.localdomain clamd[6094]: Running as user clamscan (UI>
Oct 17 14:21:30 localhost.localdomain clamd[6094]: Log file size limited to 104>
Oct 17 14:21:30 localhost.localdomain clamd[6094]: Reading databases from /var/>
Oct 17 14:21:30 localhost.localdomain clamd[6094]: Not loading PUA signatures.
Oct 17 14:21:30 localhost.localdomain clamd[6094]: Bytecode: Security mode set >
lines 1-19/19 (END)
========================================================================

Jangan dikira dengan menggunakan linux kita sudah aman dari virus atau malware. Oleh karena itu, sebuah Antivirus atau Antimalware sangat dibutuhkan pada suatu sistem operasi, apalagi sistem operasi ini adalah sebuah server.

Sejauh ini, Instal ClamAV di keluarha linux Debian lebih mudah daripada di keluarga Red Hat. Tetapi berkat hobi bawaan "ngulik" suatu informasi, akhirnya saya ketemu juga cara instalasinya. Sekian dulu ulasan dari saya, terimakasih dan selalu semangat.

Catatan :
Silahkan komen, kopi atau bagikan artikel ini. Jangan lupa sertakan link ya Gan. 
• Jika menemui masalah, mari kita bahas bersama di Forum
• Untuk menggunakan Forum, silahkan registrasi dahulu. 
• Untuk referensi lain, silahkan kunjungi channel youtube saya.

Regard's

  • Latest News

  • Jobs Vacancy

Loading
Loading

Wordpress Hosting

Banner IDwebhost