Friday, May 28, 2010

UnInstalling Kaspersky from Plesk at the Command Line

Why Remove Kaspersky from Plesk?


Parallels Plesk Panel Anti-Virus Powered by Kaspersky

As you may be aware, Kaspersky anti-virus protects users that visit your webserver from getting infected by viruses. Perhaps the primary use of Kaspersky in Plesk is to protect your linux mailserver from spreading viruses.



Unfortunately, Kaspersky Anti-Virus for Plesk is a paid service. Some of us are on a budget and we can't afford it. If you're like me, you'll want to uninstall it.



How to Uninstall Kaspersky From Plesk


I've taken a close look at the server settings in Plesk. Most modules can't be removed, or even disabled via plesk. It's one of the limitations of Plesk, even in version 9.5.2 (the most current version of Plesk at this time). Since a GUI solution is not an option, you'll need to reach your server by command line (via SSH).



Removing Kaspersky from Your Plesk Server via Command Line


Personally, I use putty to reach my server by SSH. I also use SSH for file transfers (instead of FTP). In fact, I don't even allow FTP access on my server. This closes a lot of potential security holes...



Reach Your Remote Server via SSH


To reach your server via putty, you'll need to input your IP and port (generally SSH is on port 22). Once you reach your server you need to log in to your server with your root user and root password. Of course, if your server is local, just log in, then get to the command line.



How to Copy and Paste in PUTTY


If you want to paste your password directly into the putty interface use SHIFT + Insert (to paste). Just as an FYI, SHIFT + CTRL is the command to copy (alternatives to CTRL-C and CTRL-V to copy/ paste). The putty interface uses old-school commands--although CTRL-C does work in putty, it will also 'stop' anything currently in execution (CTRL-C was the default to stop things from running during the dark-ages of computing). Anyway, this is why the SHIFT-Insert/ Shift-CTRL options are best for copying and pasting in putty.



Uninstalling Kaspersky for Plesk Via Command Line


This here is for linux machines (just an FYI). Some common linux variants are Fedora, RedHat, CentOS, LinuxMint, Ubuntu, Debian, etc. Anyway, here are the commands you will need:



First, query via RPM to find the exact name of your installed kasperky plesk package.
[root@(your ip)]# rpm -q psa-kav
(my result:) "psa-kav-1.0.0-cos5.build95100504.12"

Next, use the exact name from your query with "rpm -e" to uninstall kaspersky:
[root@(your ip)]# rpm -e psa-kav-1.0.0-cos5.build95100504.12

Here is my result for running the above command:
Trying to start service mysqld... done
Trying to establish test connection... connected
done
Trying to unregister mailhandler... done
Trying to unregister service aveserver... aveserver couldn't be stopped
using /sbin/chkconfig
===> Unregistering module
Trying to start service mysqld... done
Trying to establish test connection... connected
done
===> Uninstalling database
Trying to remove user kluser... done
Trying to remove group klusers... done



Great Success


Great, now kaspersky is uninstalled. If you're still set on having an anti-virus on your server, I recommend Clam Antivirus. A simple yum install via SSH (command line) can get you up & running with Clam (assuming fedora, centos, or a redhat server). Your server might require an app-get or something like that (other linux flavors). I have yet to install & configure clam. If I do, I'll be following up with a new blog on the subject.



And as usual, have a craptastic day!

1 comment:

  1. One thing I hate about blogger is that it inserts way too much space between H2 and P tags.

    ReplyDelete