本文主要是記錄在centos 6.5系統上安裝卡巴斯基企業版防毒程式,安裝centos的過程就不說明了,實例是在虛擬機裡安裝的。

安裝完畢後,要往裡面放文件還是使用WinSCP比較方便,那就必須要知道centos的ip位址,在centos中使用ifconfig查看,結果是,沒開啟網路

2015.11.19_11h25m24s_001_

所以看的到網卡是eth0,這個地方是數字0,使用ifup ech0來啟用網卡,這個當次有效,想要一直有效需要修改文件

[root@centos tmp]# ifup eth0
Active connection state: activating
Active connection path: /org/freedesktop/NetworkManager/ActiveConnection/0
state: activated
Connection activated

再次用ifconfig查看IP

[root@centos tmp]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0C:29:D0:95:E0
inet addr:192.168.19.129 Bcast:192.168.19.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fed0:95e0/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:27 errors:0 dropped:0 overruns:0 frame:0
TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:10238 (9.9 KiB) TX bytes:1425 (1.3 KiB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:12 errors:0 dropped:0 overruns:0 frame:0
TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:720 (720.0 b) TX bytes:720 (720.0 b)

然後就可以使用WinSCP鏈接其中的192.168.19.129,使用root賬號和密碼來登錄進行文件管理

2015.11.19_11h29m29s_004_
我們將安裝程式及授權文件上傳,例如上傳到/var/tmp/下面
進入tmp目錄,並使用ls查看當前目錄下都有什麼文件
接下來使用rpm命令來安裝
2015.11.19_11h38m34s_005_
使用rpm –ivh kav4fs-8.0.2-256.i386.rpm 來安裝,linux下和cmd下有個功能類似,就是輸入路徑或者文件名的時候,可以按tab案件就可以快速輸入,像上圖當中,只要輸入完rpm –ivh kav,然後按下tab,剩下的內容就全部出來了。

[root@centos tmp]# rpm -ivh kav4fs-8.0.2-256.i386.rpm
Preparing… ########################################### [100%]
Error: 32-bit version of glibc must be installed before installing this package!
error: %pre(kav4fs-8.0.2-256.i386) scriptlet failed, exit status 1
error: install: %pre scriptlet failed (2), skipping kav4fs-8.0.2-256

執行報錯,因為我裝的是64位的centos,提示需要32位的glibc,使用yum install glibc.i686 來安裝

[root@centos tmp]# yum install glibc.i686
Loaded plugins: fastestmirror, refresh-packagekit, security
Determining fastest mirrors
* base: ftp.yzu.edu.tw
* extras: ftp.yzu.edu.tw
* updates: ftp.yzu.edu.tw
Setting up Install Process
Resolving Dependencies
–> Running transaction check
—> Package glibc.i686 0:2.12-1.166.el6_7.3 will be installed
–> Processing Dependency: glibc-common = 2.12-1.166.el6_7.3 for package: glibc-2.12-1.166.el6_7.3.i686
–> Processing Dependency: libfreebl3.so(NSSRAWHASH_3.12.3) for package: glibc-2.12-1.166.el6_7.3.i686
–> Processing Dependency: libfreebl3.so for package: glibc-2.12-1.166.el6_7.3.i686
–> Running transaction check
—> Package glibc-common.x86_64 0:2.12-1.132.el6 will be updated
–> Processing Dependency: glibc-common = 2.12-1.132.el6 for package: glibc-2.12-1.132.el6.x86_64
—> Package glibc-common.x86_64 0:2.12-1.166.el6_7.3 will be an update
—> Package nss-softokn-freebl.x86_64 0:3.14.3-9.el6 will be updated
—> Package nss-softokn-freebl.i686 0:3.14.3-23.el6_7 will be installed
—> Package nss-softokn-freebl.x86_64 0:3.14.3-23.el6_7 will be an update
–> Running transaction check
—> Package glibc.x86_64 0:2.12-1.132.el6 will be updated
–> Processing Dependency: glibc = 2.12-1.132.el6 for package: glibc-headers-2.12-1.132.el6.x86_64
–> Processing Dependency: glibc = 2.12-1.132.el6 for package: glibc-devel-2.12-1.132.el6.x86_64
—> Package glibc.x86_64 0:2.12-1.166.el6_7.3 will be an update
–> Running transaction check
—> Package glibc-devel.x86_64 0:2.12-1.132.el6 will be updated
—> Package glibc-devel.x86_64 0:2.12-1.166.el6_7.3 will be an update
—> Package glibc-headers.x86_64 0:2.12-1.132.el6 will be updated
—> Package glibc-headers.x86_64 0:2.12-1.166.el6_7.3 will be an update
–> Finished Dependency Resolution

Dependencies Resolved

================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
glibc i686 2.12-1.166.el6_7.3 updates 4.3 M
Installing for dependencies:
nss-softokn-freebl i686 3.14.3-23.el6_7 updates 157 k
Updating for dependencies:
glibc x86_64 2.12-1.166.el6_7.3 updates 3.8 M
glibc-common x86_64 2.12-1.166.el6_7.3 updates 14 M
glibc-devel x86_64 2.12-1.166.el6_7.3 updates 986 k
glibc-headers x86_64 2.12-1.166.el6_7.3 updates 615 k
nss-softokn-freebl x86_64 3.14.3-23.el6_7 updates 167 k

Transaction Summary
================================================================================
Install 2 Package(s)
Upgrade 5 Package(s)

Total download size: 24 M
Is this ok [y/N]: y
Downloading Packages:
(1/7): glibc-2.12-1.166.el6_7.3.i686.rpm | 4.3 MB 00:00
(2/7): glibc-2.12-1.166.el6_7.3.x86_64.rpm | 3.8 MB 00:00
(3/7): glibc-common-2.12-1.166.el6_7.3.x86_64.rpm | 14 MB 00:02
(4/7): glibc-devel-2.12-1.166.el6_7.3.x86_64.rpm | 986 kB 00:00
(5/7): glibc-headers-2.12-1.166.el6_7.3.x86_64.rpm | 615 kB 00:00
(6/7): nss-softokn-freebl-3.14.3-23.el6_7.i686.rpm | 157 kB 00:00
(7/7): nss-softokn-freebl-3.14.3-23.el6_7.x86_64.rpm | 167 kB 00:00
——————————————————————————–
Total 4.9 MB/s | 24 MB 00:04
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
Importing GPG key 0xC105B9DE:
Userid : CentOS-6 Key (CentOS 6 Official Signing Key) <centos-6-key@centos.org>
Package: centos-release-6-5.el6.centos.11.1.x86_64 (@anaconda-CentOS-201311272149.x86_64/6.5)
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
Is this ok [y/N]: y
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : glibc-common-2.12-1.166.el6_7.3.x86_64 1/12
Updating : glibc-2.12-1.166.el6_7.3.x86_64 2/12
Updating : nss-softokn-freebl-3.14.3-23.el6_7.x86_64 3/12
Updating : glibc-headers-2.12-1.166.el6_7.3.x86_64 4/12
Installing : glibc-2.12-1.166.el6_7.3.i686 [####################################################### ] 5/ Installing : glibc-2.12-1.166.el6_7.3.i686 [######################################################## ] Installing : glibc-2.12-1.166.el6_7.3.i686 [######################################################### ] Installing : glibc-2.12-1.166.el6_7.3.i686 [########################################################## ] Installing : glibc-2.12-1.166.el6_7.3.i686 [########################################################### ] Installing : glibc-2.12-1.166.el6_7.3.i686 [########################################################## Installing : glibc-2.12-1.166.el6_7.3.i686 5/12
Installing : nss-softokn-freebl-3.14.3-23.el6_7. [# ] 6/1 Installing : nss-softokn-freebl-3.14.3-23.el6_7. [###### ] 6/1 Installing : nss-softokn-freebl-3.14.3-23.el6_7. [############ ] 6/ Installing : nss-softokn-freebl-3.14.3-23.el6_7. [################### ] 6/ Installing : nss-softokn-freebl-3.14.3-23.el6_7. [######################## ] 6/ Installing : nss-softokn-freebl-3.14.3-23.el6_7. [############################## ] 6/ Installing : nss-softokn-freebl-3.14.3-23.el6_7. [################################### ] 6/ Installing : nss-softokn-freebl-3.14.3-23.el6_7.i686 6/12
Updating : glibc-devel-2.12-1.166.el6_7.3.x86_64 7/12
Cleanup : glibc-devel-2.12-1.132.el6.x86_64 8/12
Cleanup : glibc-headers-2.12-1.132.el6.x86_64 9/12
Cleanup : glibc-common-2.12-1.132.el6.x86_64 10/12
Cleanup : nss-softokn-freebl-3.14.3-9.el6.x86_64 11/12
Cleanup : glibc-2.12-1.132.el6.x86_64 12/12
Verifying : nss-softokn-freebl-3.14.3-23.el6_7.i686 1/12
Verifying : glibc-devel-2.12-1.166.el6_7.3.x86_64 2/12
Verifying : nss-softokn-freebl-3.14.3-23.el6_7.x86_64 3/12
Verifying : glibc-2.12-1.166.el6_7.3.i686 4/12
Verifying : glibc-2.12-1.166.el6_7.3.x86_64 5/12
Verifying : glibc-common-2.12-1.166.el6_7.3.x86_64 6/12
Verifying : glibc-headers-2.12-1.166.el6_7.3.x86_64 7/12
Verifying : nss-softokn-freebl-3.14.3-9.el6.x86_64 8/12
Verifying : glibc-2.12-1.132.el6.x86_64 9/12
Verifying : glibc-devel-2.12-1.132.el6.x86_64 10/12
Verifying : glibc-common-2.12-1.132.el6.x86_64 11/12
Verifying : glibc-headers-2.12-1.132.el6.x86_64 12/12

Installed:
glibc.i686 0:2.12-1.166.el6_7.3

Dependency Installed:
nss-softokn-freebl.i686 0:3.14.3-23.el6_7

Dependency Updated:
glibc.x86_64 0:2.12-1.166.el6_7.3 glibc-common.x86_64 0:2.12-1.166.el6_7.3
glibc-devel.x86_64 0:2.12-1.166.el6_7.3 glibc-headers.x86_64 0:2.12-1.166.el6_7.3
nss-softokn-freebl.x86_64 0:3.14.3-23.el6_7

Complete!

接下來再執行命令安裝

[root@centos tmp]# rpm -ivh kav4fs-8.0.2-256.i386.rpm
Preparing… ########################################### [100%]
1:kav4fs ########################################### [100%]
Starting kav4fs-supervisor [ OK ]
Kaspersky Anti-Virus for Linux File Server has been installed successfully,
but it must be properly configured before using.
Please run /opt/kaspersky/kav4fs/bin/kav4fs-setup.pl script manually to
configure it.
[root@centos tmp]# /opt/kaspersky/kav4fs/bin/kav4fs-setup.pl

Kaspersky Anti-Virus for Linux File Server version 8.0.2.256/RELEASE

Accepting the End User License Agreement (EULA)

Please read and accept the End User License Agreement (EULA) to continue.

NOTE: To quit the EULA viewer, press the “q” key.

Press Enter to display it.
q

Do you accept EULA? (yes/no)
yes

Setting up the Anti-Virus Service default locale

You need to specify a locale the Anti-Virus Service will use when applying
the protection settings.
It is very important to specify the locale you are using when working with
the file system names (in most cases this should be the system default
locale). [en_US.utf8]:

Anti-Virus Service default locale is changed to ‘en_US.utf8’.
Service will be restarted if already running.
Shutting down kav4fs-supervisor [ OK ]
Starting kav4fs-supervisor [ OK ]
Waiting for Kaspersky Anti-Virus for Linux File Server to make ready after
restart…

Installing the license

The key file (a file with the .key extension) contains information about
your license. You need to install it to use the application.
To install it now, enter the path to your key file (or enter an empty
string to continue without installing the key file):
/var/tmp/1.key
The license from /var/tmp/1.key has been installed.

Configuring the proxy settings to connect to the updates source

If you use an HTTP proxy server to access the Internet, you need to specify
its address to allow the application
to connect to the updates source.
Please enter the address of your HTTP proxy server in one of the following
formats: proxyIP:port or user:pass@proxyIP:port.

If you don’t have or need a proxy server to access the Internet, enter ‘no’
here, or enter ‘skip’ to use current settings without changes. [no]:

Downloading the latest application databases

The latest databases are an essential part of your server protection.
Would you like to download the latest databases now?
(If you answer ‘yes’, make sure you are connected to the Internet): [yes]:

Task progress… ########################################### [100%]

Enabling scheduled updates of the application databases

Would you like to enable scheduled updates? [N]:

中間的過程就省略了,主要就是問你是否同意協議,要不要更新,授權在哪裡等等

To open the Kaspersky Anti-Virus web console enter the following address in
the address line of the web browser:
http://<;ip-address-or-domain-name-of-the-protected-server>:9080

You can change password for Kaspersky Web Management Console by executing
/opt/kaspersky/kav4fs/bin/kav4fs-wmconsole-passwd

Starting the real-time protection task

Error: Couldn’t perform the operation.
Error: The Real-time protection could not be started because the kernel module is not loaded. Check if the kernel module kav4fs_oas.ko is correctly compiled and properly installed.

最後有一步是問你要不要設定web管理的密碼,預設是No,如果需要的話,可以輸入yes,並設定密碼,在文章後面會有截圖
安裝就結束了,程式有裝上,但是無法開啟實時監控,接下來我們檢查幾個地方

[root@centos tmp]# uname -a
Linux centos 2.6.32-431.el6.x86_64 #1 SMP Fri Nov 22 03:15:09 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
[root@centos tmp]# gcc -v
bash: gcc: command not found
[root@centos tmp]# rpm -q kernel-devel
package kernel-devel is not installed
[root@centos tmp]# rpm -q glibc
glibc-2.12-1.166.el6_7.3.x86_64
glibc-2.12-1.166.el6_7.3.i686

先安裝GCC

[root@centos tmp]# yum install gcc
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: ftp.yzu.edu.tw
* extras: ftp.yzu.edu.tw
* updates: ftp.yzu.edu.tw
Setting up Install Process
Resolving Dependencies
–> Running transaction check
—> Package gcc.x86_64 0:4.4.7-16.el6 will be installed
–> Processing Dependency: libgomp = 4.4.7-16.el6 for package: gcc-4.4.7-16.el6.x86_64
–> Processing Dependency: cpp = 4.4.7-16.el6 for package: gcc-4.4.7-16.el6.x86_64
–> Processing Dependency: libgcc >= 4.4.7-16.el6 for package: gcc-4.4.7-16.el6.x86_64
–> Processing Dependency: cloog-ppl >= 0.15 for package: gcc-4.4.7-16.el6.x86_64
–> Running transaction check
—> Package cloog-ppl.x86_64 0:0.15.7-1.2.el6 will be installed
–> Processing Dependency: libppl_c.so.2()(64bit) for package: cloog-ppl-0.15.7-1.2.el6.x86_64
–> Processing Dependency: libppl.so.7()(64bit) for package: cloog-ppl-0.15.7-1.2.el6.x86_64
—> Package cpp.x86_64 0:4.4.7-16.el6 will be installed
–> Processing Dependency: libmpfr.so.1()(64bit) for package: cpp-4.4.7-16.el6.x86_64
—> Package libgcc.x86_64 0:4.4.7-4.el6 will be updated
—> Package libgcc.x86_64 0:4.4.7-16.el6 will be an update
—> Package libgomp.x86_64 0:4.4.7-4.el6 will be updated
—> Package libgomp.x86_64 0:4.4.7-16.el6 will be an update
–> Running transaction check
—> Package mpfr.x86_64 0:2.4.1-6.el6 will be installed
—> Package ppl.x86_64 0:0.10.2-11.el6 will be installed
–> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
Package Arch Version Repository Size
====================================================================================================
Installing:
gcc x86_64 4.4.7-16.el6 base 10 M
Installing for dependencies:
cloog-ppl x86_64 0.15.7-1.2.el6 base 93 k
cpp x86_64 4.4.7-16.el6 base 3.7 M
mpfr x86_64 2.4.1-6.el6 base 157 k
ppl x86_64 0.10.2-11.el6 base 1.3 M
Updating for dependencies:
libgcc x86_64 4.4.7-16.el6 base 103 k
libgomp x86_64 4.4.7-16.el6 base 134 k

Transaction Summary
====================================================================================================
Install 5 Package(s)
Upgrade 2 Package(s)

Total download size: 16 M
Is this ok [y/N]: y
Downloading Packages:
(1/7): cloog-ppl-0.15.7-1.2.el6.x86_64.rpm | 93 kB 00:00
(2/7): cpp-4.4.7-16.el6.x86_64.rpm | 3.7 MB 00:00
(3/7): gcc-4.4.7-16.el6.x86_64.rpm | 10 MB 00:01
(4/7): libgcc-4.4.7-16.el6.x86_64.rpm | 103 kB 00:00
(5/7): libgomp-4.4.7-16.el6.x86_64.rpm | 134 kB 00:00
(6/7): mpfr-2.4.1-6.el6.x86_64.rpm | 157 kB 00:00
(7/7): ppl-0.10.2-11.el6.x86_64.rpm | 1.3 MB 00:00
—————————————————————————————————-
Total 4.9 MB/s | 16 MB 00:03
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
Updating : libgcc-4.4.7-16.el6.x86_64 1/9
Installing : ppl-0.10.2-11.el6.x86_64 2/9
Installing : cloog-ppl-0.15.7-1.2.el6.x86_64 3/9
Installing : mpfr-2.4.1-6.el6.x86_64 4/9
Installing : cpp-4.4.7-16.el6.x86_64 5/9
Updating : libgomp-4.4.7-16.el6.x86_64 6/9
Installing : gcc-4.4.7-16.el6.x86_64 7/9
Cleanup : libgcc-4.4.7-4.el6.x86_64 8/9
Cleanup : libgomp-4.4.7-4.el6.x86_64 9/9
Verifying : libgomp-4.4.7-16.el6.x86_64 1/9
Verifying : gcc-4.4.7-16.el6.x86_64 2/9
Verifying : mpfr-2.4.1-6.el6.x86_64 3/9
Verifying : cloog-ppl-0.15.7-1.2.el6.x86_64 4/9
Verifying : cpp-4.4.7-16.el6.x86_64 5/9
Verifying : ppl-0.10.2-11.el6.x86_64 6/9
Verifying : libgcc-4.4.7-16.el6.x86_64 7/9
Verifying : libgomp-4.4.7-4.el6.x86_64 8/9
Verifying : libgcc-4.4.7-4.el6.x86_64 9/9

Installed:
gcc.x86_64 0:4.4.7-16.el6

Dependency Installed:
cloog-ppl.x86_64 0:0.15.7-1.2.el6 cpp.x86_64 0:4.4.7-16.el6 mpfr.x86_64 0:2.4.1-6.el6
ppl.x86_64 0:0.10.2-11.el6

Dependency Updated:
libgcc.x86_64 0:4.4.7-16.el6 libgomp.x86_64 0:4.4.7-16.el6

Complete!

再安裝kernel-devel

[root@centos tmp]# yum install kernel-devel
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: ftp.yzu.edu.tw
* extras: ftp.yzu.edu.tw
* updates: ftp.yzu.edu.tw
Setting up Install Process
Resolving Dependencies
–> Running transaction check
—> Package kernel-devel.x86_64 0:2.6.32-573.8.1.el6 will be installed
–> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
Package Arch Version Repository Size
====================================================================================================
Installing:
kernel-devel x86_64 2.6.32-573.8.1.el6 updates 10 M

Transaction Summary
====================================================================================================
Install 1 Package(s)

Total download size: 10 M
Installed size: 25 M
Is this ok [y/N]: y
Downloading Packages:
kernel-devel-2.6.32-573.8.1.el6.x86_64.rpm | 10 MB 00:02
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : kernel-devel-2.6.32-573.8.1.el6.x86_64 1/1
Verifying : kernel-devel-2.6.32-573.8.1.el6.x86_64 1/1

Installed:
kernel-devel.x86_64 0:2.6.32-573.8.1.el6

Complete!

我們再查下版本

[root@centos tmp]# uname -a
Linux centos 2.6.32-431.el6.x86_64 #1 SMP Fri Nov 22 03:15:09 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
[root@centos tmp]# rpm -q kernel-devel
kernel-devel-2.6.32-573.8.1.el6.x86_64
[root@centos tmp]# gcc -v
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure –prefix=/usr –mandir=/usr/share/man –infodir=/usr/share/info –with-bugurl=http://bugzilla.redhat.com/bugzilla –enable-bootstrap –enable-shared –enable-threads=posix –enable-checking=release –with-system-zlib –enable-__cxa_atexit –disable-libunwind-exceptions –enable-gnu-unique-object –enable-languages=c,c++,objc,obj-c++,java,fortran,ada –enable-java-awt=gtk –disable-dssi –with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre –enable-libgcj-multifile –enable-java-maintainer-mode –with-ecj-jar=/usr/share/java/eclipse-ecj.jar –disable-libjava-multilib –with-ppl –with-cloog –with-tune=generic –with-arch_32=i686 –build=x86_64-redhat-linux
Thread model: posix
gcc version 4.4.7 20120313 (Red Hat 4.4.7-16) (GCC)

我們看到kernel和kernel-devel的版本是不同的,一個是431一個是573,如果版本不同,卡巴斯基一樣是無法編譯成功,所以我們把kernel也升級一下,並且還有一個情況,剛裝好系統的kernel是在/usr/src/kernels/裡,而在/usr/src/kernels/下是空白的,升級kernel後,/usr/src/kernels/就有東西了

[root@centos tmp]# yum install kernel
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: ftp.yzu.edu.tw
* extras: ftp.yzu.edu.tw
* updates: ftp.yzu.edu.tw
Setting up Install Process
Resolving Dependencies
–> Running transaction check
—> Package kernel.x86_64 0:2.6.32-573.8.1.el6 will be installed
–> Processing Dependency: kernel-firmware >= 2.6.32-573.8.1.el6 for package: kernel-2.6.32-573.8.1.el6.x86_64
–> Processing Dependency: dracut-kernel >= 004-388.el6 for package: kernel-2.6.32-573.8.1.el6.x86_64
–> Running transaction check
—> Package dracut-kernel.noarch 0:004-335.el6 will be updated
—> Package dracut-kernel.noarch 0:004-388.el6 will be an update
–> Processing Dependency: dracut = 004-388.el6 for package: dracut-kernel-004-388.el6.noarch
—> Package kernel-firmware.noarch 0:2.6.32-431.el6 will be updated
—> Package kernel-firmware.noarch 0:2.6.32-573.8.1.el6 will be an update
–> Running transaction check
—> Package dracut.noarch 0:004-335.el6 will be updated
—> Package dracut.noarch 0:004-388.el6 will be an update
–> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
Package Arch Version Repository Size
====================================================================================================
Installing:
kernel x86_64 2.6.32-573.8.1.el6 updates 30 M
Updating for dependencies:
dracut noarch 004-388.el6 base 125 k
dracut-kernel noarch 004-388.el6 base 26 k
kernel-firmware noarch 2.6.32-573.8.1.el6 updates 18 M

Transaction Summary
====================================================================================================
Install 1 Package(s)
Upgrade 3 Package(s)

Total download size: 48 M
Is this ok [y/N]: y
Downloading Packages:
(1/4): dracut-004-388.el6.noarch.rpm | 125 kB 00:00
(2/4): dracut-kernel-004-388.el6.noarch.rpm | 26 kB 00:00
(3/4): kernel-2.6.32-573.8.1.el6.x86_64.rpm | 30 MB 00:05
(4/4): kernel-firmware-2.6.32-573.8.1.el6.noarch.rpm | 18 MB 00:03
—————————————————————————————————-
Total 4.9 MB/s | 48 MB 00:09
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : dracut-004-388.el6.noarch 1/7
Updating : dracut-kernel-004-388.el6.noarch 2/7
Updating : kernel-firmware-2.6.32-573.8.1.el6.noarch 3/7
Installing : kernel-2.6.32-573.8.1.el6.x86_64 4/7
Cleanup : dracut-kernel-004-335.el6.noarch 5/7
Cleanup : dracut-004-335.el6.noarch 6/7
Cleanup : kernel-firmware-2.6.32-431.el6.noarch 7/7
Verifying : dracut-kernel-004-388.el6.noarch 1/7
Verifying : kernel-firmware-2.6.32-573.8.1.el6.noarch 2/7
Verifying : kernel-2.6.32-573.8.1.el6.x86_64 3/7
Verifying : dracut-004-388.el6.noarch 4/7
Verifying : kernel-firmware-2.6.32-431.el6.noarch 5/7
Verifying : dracut-kernel-004-335.el6.noarch 6/7
Verifying : dracut-004-335.el6.noarch 7/7

Installed:
kernel.x86_64 0:2.6.32-573.8.1.el6

Dependency Updated:
dracut.noarch 0:004-388.el6 dracut-kernel.noarch 0:004-388.el6
kernel-firmware.noarch 0:2.6.32-573.8.1.el6

Complete!

這個時候兩者的版本就一致了,接下來開始編譯,注意後半部的el6是字母l不是數字1,我打了幾次都出錯才發現

[root@centos tmp]# /opt/kaspersky/kav4fs/bin/kav4fs-setup.pl –build=/usr/src/kernels/2.6.32-573.8.1.el6.x86_64

Kaspersky Anti-Virus for Linux File Server version 8.0.2.256/RELEASE

Setting up the kernel-level real-time protection

>>> Configuring the kernel-level real-time protection module using the Linux kernel source code from /usr/src/kernels/2.6.32-573.8.1.el6.x86_64
checking for gcc… gcc
checking whether the C compiler works… yes
checking for C compiler default output file name… a.out
checking for suffix of executables…
checking whether we are cross compiling… no
checking for suffix of object files… o
checking whether we are using the GNU C compiler… yes
checking whether gcc accepts -g… yes
checking for gcc option to accept ISO C89… none needed
checking build system type… x86_64-unknown-linux-gnu
checking host system type… x86_64-unknown-linux-gnu
checking target system type… x86_64-unknown-linux-gnu
CentOS release 6.5 (Final)
checking for linux kernel sources… /usr/src/kernels/2.6.32-573.8.1.el6.x86_64
checking for linux kernel version file… /usr/src/kernels/2.6.32-573.8.1.el6.x86_64/include/linux/utsrelease.h
checking for linux kernel version… 2.6
checking for arch_ptrace… found, address 0xffffffff81019f70
checking for access_process_vm… found, address 0xffffffff81153970
checking for __ptrace_link… found, address 0xffffffff810dea20
checking for __ptrace_unlink… found, address 0xffffffff810dd400
checking for get_empty_filp… found, address 0xffffffff811930b0
checking for release_open_intent… found, address 0xffffffff8119f840
checking for sys_call_table… found, address 0xffffffff816005e0
checking for kstrdup… found, address 0xffffffff81148e30
configure: creating ./config.status
config.status: creating redirfs/Makefile
config.status: creating Makefile
config.status: creating kavmon.h
config.status: creating osdef.h
config.status: creating module.linux/Makefile

>>> Compiling the kernel-level real-time protection module
Cleaning redirfs
make[1]: Entering directory /opt/kaspersky/kav4fs/src/kernel/redirfs'
make -C /usr/src/kernels/2.6.32-573.8.1.el6.x86_64 SUBDIRS=/opt/kaspersky/kav4fs/src/kernel/redirfs clean
make[2]: Entering directory
/usr/src/kernels/2.6.32-573.8.1.el6.x86_64′
make[2]: Leaving directory /usr/src/kernels/2.6.32-573.8.1.el6.x86_64'
rm -f ../bin//redirfs.ko
make[1]: Leaving directory
/opt/kaspersky/kav4fs/src/kernel/redirfs’
Cleaning module.linux
make[1]: Entering directory /opt/kaspersky/kav4fs/src/kernel/module.linux'
make -C /usr/src/kernels/2.6.32-573.8.1.el6.x86_64 SUBDIRS=/opt/kaspersky/kav4fs/src/kernel/module.linux clean
make[2]: Entering directory
/usr/src/kernels/2.6.32-573.8.1.el6.x86_64′
make[2]: Leaving directory /usr/src/kernels/2.6.32-573.8.1.el6.x86_64'
rm -f ../bin//kav4fs_oas.ko redirfs Module.symvers Modules.symvers
rm -f kernel.c queue.c cache.c cache.h kavmon.h kernel.h osdef.h queue.h util.h
make[1]: Leaving directory
/opt/kaspersky/kav4fs/src/kernel/module.linux’
Making link in redirfs
make[1]: Entering directory /opt/kaspersky/kav4fs/src/kernel/redirfs'
make -C /usr/src/kernels/2.6.32-573.8.1.el6.x86_64 SUBDIRS=/opt/kaspersky/kav4fs/src/kernel/redirfs modules
make[2]: Entering directory
/usr/src/kernels/2.6.32-573.8.1.el6.x86_64′
CC [M] /opt/kaspersky/kav4fs/src/kernel/redirfs/rfs_path.o
CC [M] /opt/kaspersky/kav4fs/src/kernel/redirfs/rfs_root.o
CC [M] /opt/kaspersky/kav4fs/src/kernel/redirfs/rfs_info.o
CC [M] /opt/kaspersky/kav4fs/src/kernel/redirfs/rfs_file.o
CC [M] /opt/kaspersky/kav4fs/src/kernel/redirfs/rfs_dentry.o
CC [M] /opt/kaspersky/kav4fs/src/kernel/redirfs/rfs_flt.o
CC [M] /opt/kaspersky/kav4fs/src/kernel/redirfs/rfs_inode.o
CC [M] /opt/kaspersky/kav4fs/src/kernel/redirfs/rfs_dcache.o
CC [M] /opt/kaspersky/kav4fs/src/kernel/redirfs/rfs_chain.o
CC [M] /opt/kaspersky/kav4fs/src/kernel/redirfs/rfs_ops.o
CC [M] /opt/kaspersky/kav4fs/src/kernel/redirfs/rfs_data.o
CC [M] /opt/kaspersky/kav4fs/src/kernel/redirfs/rfs.o
LD [M] /opt/kaspersky/kav4fs/src/kernel/redirfs/redirfs.o
Building modules, stage 2.
MODPOST 1 modules
CC /opt/kaspersky/kav4fs/src/kernel/redirfs/redirfs.mod.o
LD [M] /opt/kaspersky/kav4fs/src/kernel/redirfs/redirfs.ko.unsigned
NO SIGN [M] /opt/kaspersky/kav4fs/src/kernel/redirfs/redirfs.ko
make[2]: Leaving directory /usr/src/kernels/2.6.32-573.8.1.el6.x86_64'
make[1]: Leaving directory
/opt/kaspersky/kav4fs/src/kernel/redirfs’
Making link in module.linux
make[1]: Entering directory /opt/kaspersky/kav4fs/src/kernel/module.linux'
make -C /usr/src/kernels/2.6.32-573.8.1.el6.x86_64 SUBDIRS=/opt/kaspersky/kav4fs/src/kernel/module.linux modules
make[2]: Entering directory
/usr/src/kernels/2.6.32-573.8.1.el6.x86_64′
CC [M] /opt/kaspersky/kav4fs/src/kernel/module.linux/module.o
CC [M] /opt/kaspersky/kav4fs/src/kernel/module.linux/interface.o
CC [M] /opt/kaspersky/kav4fs/src/kernel/module.linux/interface_monitor.o
CC [M] /opt/kaspersky/kav4fs/src/kernel/module.linux/files.o
CC [M] /opt/kaspersky/kav4fs/src/kernel/module.linux/operations.o
CC [M] /opt/kaspersky/kav4fs/src/kernel/module.linux/kernel.o
CC [M] /opt/kaspersky/kav4fs/src/kernel/module.linux/queue.o
CC [M] /opt/kaspersky/kav4fs/src/kernel/module.linux/cache.o
CC [M] /opt/kaspersky/kav4fs/src/kernel/module.linux/interceptor_rfs.o
LD [M] /opt/kaspersky/kav4fs/src/kernel/module.linux/kav4fs_oas.o
Building modules, stage 2.
MODPOST 1 modules
CC /opt/kaspersky/kav4fs/src/kernel/module.linux/kav4fs_oas.mod.o
LD [M] /opt/kaspersky/kav4fs/src/kernel/module.linux/kav4fs_oas.ko.unsigned
NO SIGN [M] /opt/kaspersky/kav4fs/src/kernel/module.linux/kav4fs_oas.ko
make[2]: Leaving directory /usr/src/kernels/2.6.32-573.8.1.el6.x86_64'
make[1]: Leaving directory
/opt/kaspersky/kav4fs/src/kernel/module.linux’

>>> Installing the module as /lib/modules/2.6.32-431.el6.x86_64/misc/kav4fs_oas.ko

>>> Installing the module as /lib/modules/2.6.32-431.el6.x86_64/misc/redirfs.ko
>>> Rebuilding modules.dep
>>> Probing a new module
>>> Unloading the module kav4fs_oas

這樣編譯就完成了,我們用web登錄看一下,其實安裝完成後就可以登錄了,只是實時監控的部分會發現無法開啟,因為現在預設有開啟防火牆,直接訪問http://192.168.19.129:9080/會無法鏈接,需要先關閉防火牆或者添加規則

1、重啟後永久性生效:
開啟:chkconfig iptables on
關閉:chkconfig iptables off
2、即時生效,重啟後失效:
開啟:service iptables start
關閉:service iptables stop
在開啟了防火牆時,做如下設置,開啟相關端口,修改 /etc/sysconfig/iptables 文件,添加以下內容:
-A INPUT -m狀態–state NEW -m TCP -p TCP –dport 80 -j ACCEPT                   #允許80端口通過防火牆
-A INPUT -m狀態–state NEW -m TCP -p TCP –dport 3306 -j ACCEPT              #允許3306端口通過防火牆
備註:很多網友把這兩條規則添加到防火牆配置的最後一行,導致防火牆啟動失敗,
正確的應該是添加到默認的22端口這條規則的下面
-A INPUT -m state –state NEW -m tcp -p tcp –dport 22 -j ACCEPT
本次先臨時關閉下

[root@centos tmp]# service iptables stop
iptables: Setting chains to policy ACCEPT: filter [ OK ]
iptables: Flushing firewall rules: [ OK ]
iptables: Unloading modules: [ OK ]

2015.11.19_15h29m35s_017_
登錄進系統後頂部是紅色,監控未開啟,選擇real-time protection
2015.11.19_15h29m52s_018_
啟用之後發現可以啟動成功
2015.11.19_15h30m21s_019_

2015.11.19_15h30m41s_020_
工作完成

最後修改日期: 2016-07-28

作者

Leave a Reply

這個網站採用 Akismet 服務減少垃圾留言。進一步瞭解 Akismet 如何處理網站訪客的留言資料

  Subscribe  
Notify of