1, Download source package
http://sourceforge.net/projects/clamav/files/clamav/0.97.4/clamav-0.97.4.tar.gz/download
2, create clamav group and user
[root@localhost clamav-0.97.4]#groupadd clamav
[root@localhost clamav-0.97.4]#adduser -g clamav clamav
3, Unzip file and install
tar zxvf clamav-0.97.4.tar.gz
cd clamav-0.97.4
./configure
make
make install
4, update clamav DB
a, create update log file
vim /var/log/freshclam.log
chown clamav:clamav /var/log/freshclam.log
b, config configure file
vim /usr/local/etc/freshclam.conf
# Comment or remove the line below.
#Example
# Path to the database directory.
# WARNING: It must match clamd.conf's directive!
# Default: hardcoded (depends on installation options)
#DatabaseDirectory /var/lib/clamav
DatabaseDirectory /usr/local/share/clamav
# Path to the log file (make sure it has proper permissions)
# Default: disabled
UpdateLogFile /var/log/freshclam.log
# Maximum size of the log file.
# Value of 0 disables the limit.
# You may use 'M' or 'm' for megabytes (1M = 1m = 1048576 bytes)
# and 'K' or 'k' for kilobytes (1K = 1k = 1024 bytes).
# in bytes just don't use modifiers.
# Default: 1M
LogFileMaxSize 2M
# Log time with each message.
# Default: no
LogTime yes
# Enable verbose logging.
# Default: no
LogVerbose yes
# Use system logger (can work together with UpdateLogFile).
# Default: no
LogSyslog yes
5, update clamav DB - you can add this in the cronjob
/usr/local/bin/freshclam
6, DB folder
[root@localhost ~]# ll /usr/local/share/clamav
total 33524
-rw-r--r-- 1 clamav clamav 59546 Apr 12 14:54 bytecode.cvd
-rw-r--r-- 1 clamav clamav 3461818 Apr 12 14:54 daily.cvd
-rw-rw-r-- 1 clamav clamav 30750647 Apr 12 14:13 main.cvd
-rw------- 1 clamav clamav 468 Apr 12 14:54 mirrors.dat
Thursday, April 12, 2012
Thursday, April 5, 2012
Wednesday, March 28, 2012
sendmail attachment
echo 'abc.com DB backup' | nail -a ~/security/abc.mysql -s 'abc DB backup ' abc@gmail.com
Friday, March 16, 2012
Apache not parsing php page
1,
yum install httpd php
2, check if php.conf in the folder of httpd conf
/etc/httpd/conf.d/php.conf
3, restart httpd
service httpd restart
yum install httpd php
2, check if php.conf in the folder of httpd conf
/etc/httpd/conf.d/php.conf
3, restart httpd
service httpd restart
Thursday, March 15, 2012
`require': no such file to load
Error message:
[root@localhost restful]# ruby validedge.rb
validedge.rb:3:in `require': no such file to load -- rest_client (LoadError)
from validedge.rb:3
[root@localhost restful]# cat validedge.rb
#!/usr/bin/env ruby
require 'rest_client'
#require 'rest-client'
RestClient.get 'http://google.com/'
Solution:
Add require 'rubygems'
[root@localhost restful]# cat validedge.rb
#!/usr/bin/env ruby
require 'rubygems'
require 'rest_client'
#require 'rest-client'
RestClient.get 'http://google.com/'
[root@localhost restful]# ruby validedge.rb
validedge.rb:3:in `require': no such file to load -- rest_client (LoadError)
from validedge.rb:3
[root@localhost restful]# cat validedge.rb
#!/usr/bin/env ruby
require 'rest_client'
#require 'rest-client'
RestClient.get 'http://google.com/'
Solution:
Add require 'rubygems'
[root@localhost restful]# cat validedge.rb
#!/usr/bin/env ruby
require 'rubygems'
require 'rest_client'
#require 'rest-client'
RestClient.get 'http://google.com/'
Wednesday, March 7, 2012
Subscribe to:
Posts (Atom)
-
Step 1, New a project rails new demo Step 2, Update Gemfile add paperclip, mysql2 gem, enable JavaScript runtime gem 'mysql2' ...
-
When trying to access transmission from web-browswer i got the message : 403: Forbidden Unauthorized IP Address. Either disable the IP ad...