Tuesday, June 11, 2013

Install Clamav antivirus on Centos

Clamav is a much misunderstood software, at least from the response of people I know.

This is a follow up of previous posting http://tboxmy.blogspot.com/2011/06/open-source-software-antivirus-called.html

A simple to read manual can be found at
http://www.clamav.net/doc/latest/clamdoc.pdf

However, here are steps I took for the installation on Centos 6.3 and Centos 5.6

Step 1: Install required repository for clamav
http://tboxmy.blogspot.com/2013/06/install-yum-repo-for-centos.html

Step 2: Install the clamav software
yum install clamd clamav clamav-db

Step 3: Edit the configuration files with your own preferences
/etc/clamd.conf
/etc/freshclam.conf

Step 4: Test the scan with an example directory [/tmp/samples] and save the results in [output.scan]
clamscan -r -l output.scan /tmp/samples

You should notice a warning that the virus database is outdated.

Step 5: Update the virus database. Make sure the server has internet access, then type
freshclam

By default update is done daily, but can be changed by moving the /etc/cron.daily/freshclam to another cron folder.

Step 6: Schedule the scan with crontab
Use the command in step 4 as an example

Step 7: Manage how files detected as virus are handled

e.g. use perl-File-Scan-ClamAV



Install Yum repo for Centos

Adding additional source of packages (software) for Centos will greatly reduce the need to recompile OSS packages. Epel provides open source software that is free for use. This includes clamav, atop, cacti,

Here are step to add a common repository.

Centos 5

Step 1: install and enable epel repo
rpm -Uvh http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm


Centos 6

Step 1: install and enable epel repo
rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-5.noarch.rpm

Step 2: Enable priorities
yum install yum-priorities

Edit /etc/yum.repos.d/epel.repo
add under [epel]
priority=10


Friday, June 7, 2013

TinyMCE

One of the widely used WYSWIG for web forms is called TinyMCE. Currently it is at version 3.5.8 and version 4.0 is in Beta. Licensed as LGPL, it is available for download freely from tinymce.com website.

I like its highly configurable options. Some of these are listed at http://www.tinymce.com/wiki.php/TinyMCE3x:Buttons/controls

Here is how it looks like from the demo site.


Thursday, June 6, 2013

Backup selected rows from MyMSQL database

Just needed a few rows of data, after confirmed its existence with

> select count (*) from `attendances` where `meeting_id`=82;

Using mysqldump

mysqldump --opt -uroot -p development attendances --where='meeting_id'=19700 > outputrows.sql

Reviewed the extensive contents then inserted back into the db.





Tuesday, May 21, 2013

OpenOffice.org templates to plan/schedule work

A great spreadsheet template to do planning for shift work. Its flexible and can be modified to suit different environments.

See http://templates.openoffice.org/en/node/9485

Should work for LibreOffice.

Thursday, May 2, 2013

SCAM using Fedex and Coca-cola names

Be careful of scams on the internet such as the one that says you have won some money through a lucky draw. Extract of the contents, I have seen, is shown below.



Header contents of that email

Read an article on this at Ripoffreport.

Tuesday, April 30, 2013

Tables in Moodle appear without border lines.

Tables in Moodle 2 will tend to have this issue where users just can't get the grid lines to appear. Another description for this, is the border lines appear during editing, but is not displayed when it is saved and viewed as a normal content page.

The misleading choice was to right click and edit using "Table properties". Did not work in what ever combination that was made.

Following are steps that can be taken when creating a standard table from scratch in Moodle.

Step 1: Right click on the existing table. Choose Cell ->Table cell properties.
It does look like we are changing one cell, but bear with me to get this applied to the whole table.


Step 2: Choose the Advanced tab. Click on the Border color's colour selection box.


Step 3: Choose a colour. Better still click on Palette or Named tabs to choose a standard colour. Click Apply. In this example, Black or #000000 is choosen as the border line colour.

Step 4: At the dropdown box choose "Update all cells in table", click "Update".

Step 5: Save changes to the page where the table is added and view the table with the border lines.

Monday, April 22, 2013

Samsung S3's Android update March 2013

Just did an OTA update from Jan 2013 to Mar 2013.

Among changes known at this moment;

Lock screen security patch. Previously there is a 5 step hack to by pass the login for the lock screen.

Camera. The menu at sides now have transparent borders. Now missing 3 scene modes, which include the fireworks, backlit.