CLAMAV CENTOS 6

     
[root@assp assp]# yum install clamav-db.x86_64 clamav-devel.x86_64 perl-ClamAV-Client.noarch clamav.x86_64 clamav-milter.x86_64 clamd.x86_64 perl-Mail-ClamAV.x86_64

[root@assp assp]# /etc/init.d/clamd start
Starting Clam AntiVirus Daemon: LibClamAV Error: cl_cvdhead: Can't read CVD header in /var/clamav/daily.cld
LibClamAV Error: cli_loaddbdir(): error parsing header of /var/clamav/daily.cld
ERROR: Malformed database
                                                           [FAILED]
[root@assp assp]# freshclam
ClamAV update process started at Fri Sep 14 19:54:14 2012
WARNING: DNS record is older than 3 hours.
WARNING: Invalid DNS reply. Falling back to HTTP mode.
Reading CVD header (main.cvd): OK

INSTALL PERL FROM SOURCE

[root@spam ~]# wget http://www.cpan.org/src/5.0/perl-5.12.3.tar.gz
--2012-09-12 05:40:13--  http://www.cpan.org/src/5.0/perl-5.12.3.tar.gz
Resolving www.cpan.org... 199.15.176.140, 212.117.177.118, 2620:101:d000:8::140:1, ...
Connecting to www.cpan.org|199.15.176.140|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 14933787 (14M) [application/x-gzip]
Saving to: `perl-5.12.3.tar.gz'



[root@spam ~]# tar -xvf perl-5.12.3.tar.gz
[root@spam ~ perl-5-12xxxx]# Sh Configure -de -Dusethreads
 

CALCULATOR COMMAND LINE


hafiz ~ $ bc
bc 1.06.95
Copyright 1991-1994, 1997, 1998, 2000, 2004, 2006 Free Software Foundation, Inc.
This is free software with ABSOLUTELY NO WARRANTY.
For details type `warranty'.


2x3
(standard_in) 3: syntax error
2*3
6
10*3:5
(standard_in) 5: illegal character: :
(standard_in) 5: syntax error
10*3/5
6


CHECK PERL MODULE LINUX CENTOS


[root@spam ~]# perldoc -m Mail::Send

specify a minimum module version

( categories:  )
Sometimes you must use a specific module version in your programs. To avod using earlier version of that module, append the minimum version number you want in the use 'module' statement:
Example:
#-- Use version 5.8 of later of module LWP
use LWP 5.8
Your program will exit with an appropriate error message if the installed module version is lower than the version you specified

execute commands on remote machines using ssh

( categories:  |  )
You can execute commands on remote machines from a Perl script using the Net::SSH::Perl module.
This module allows you to execute a command remotely and receive the STDOUT, STDERR, and exit status of that remote command.
One big advantage of Net::SSH::Perl over other methods is that you can automate the login process, that way you can write fully automated perl scripts, no console interaction is required in order to authenticate in the remote machine.
Example:

list the installed modules

( categories:  |  )
There are several ways to obtain the list of perl modules installed in a system: