The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

clamav command line install

Discussion in 'General Discussion' started by cs_student, Apr 8, 2012.

  1. cs_student

    cs_student Registered

    Joined:
    Apr 7, 2012
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    As a server administrator, I'm always dealing with websites which get hacked. I will use a program called maldet to scan a users home directory. For it to work best, I need clamav installed. I know I can go to the whm and add it; however, I wanted to know if there was a way to do it from the command line interface. This is purely for efficiency reasons.
     
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    The issue with trying to install via command line is that it won't set the option in WHM > Manage Plugins area for "Install and keep updated" with clamavconnector. Can you explain why you would like to know how to do it in command line? Is there a slew of servers needing this added?

    If you just want it added, which will cause it to be enabled in WHM > Service Manager (and will allow you to use "/scripts/restartsrv_clamd" to restart it), you can install using yum on CentOS or R:

    Code:
    yum install clamd
    I wouldn't really recommend this route as it installs rpms rather than using our installer.
     
  3. cs_student

    cs_student Registered

    Joined:
    Apr 7, 2012
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Thank you very much for your reply.
    I am aware of how to install it via yum. It is indeed on a CentOS server.
    The reasons for this is indeed that I need to install it on many servers. I would like to use the cpanel installer to keep it updated and ensure everything works correctly with cpanel.

    Is there no automated way I can do this through cpanel without logging into the whm web interface?
     
  4. thewebhosting

    thewebhosting Well-Known Member

    Joined:
    May 9, 2008
    Messages:
    1,201
    Likes Received:
    1
    Trophy Points:
    38
    No, there is no way you can do this automatically through cPanel.
     
  5. WiredChris

    WiredChris Member
    PartnerNOC

    Joined:
    Aug 7, 2013
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    DataCenter Provider
    Hi Tristan,

    I'm looking for a way to enable to clamavconnector addon through the command line. I was given this one-liner which works but I don't always have the root password when logged into a server:
    # curl -k -u 'root:RootPassword' 'https://myserver.com:2087/scripts2/saveuthemes?themetype=modules&clamavconnector=0.97.8-3.6'

    It appears that the clamd package is only included in the EPEL which I don't wish to enable on any servers. I know I can grab the tar.bz2 from httpupdate.cpanel.net and extract it in the right place and run the install but I'm afraid this won't make cPanel keep it updated. I'd really like to have it installed through cPanel for the integration and updates. Is this going to be possible to do from the command-line?
     
  6. WiredChris

    WiredChris Member
    PartnerNOC

    Joined:
    Aug 7, 2013
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    DataCenter Provider
    I just wanted to add that I'm aware of the password exposure risk of using the curl approach which makes it a less than ideal solution.
     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    There is no simple method to install this plugin via the command line. It's really better installed via Web Host Manager at this time. I agree that a script for managing the plugins via the command line would be a highly useful feature. I recommend submitting a feature request for this via:

    Submit A Feature Request

    Thank you.
     
  8. WiredChris

    WiredChris Member
    PartnerNOC

    Joined:
    Aug 7, 2013
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    DataCenter Provider
    Hi Michael,

    Thanks for your response. I've submitted a feature request but didn't receive any confirmation that it was submitted and I don't currently see it in my profile. This is my first feature request so I don't know what's supposed to happen. I'll re-submit if I don't see it appear later this week.

    You say there's no "simple method", does that mean there's a complicated way? I see there's a PluginManager.pm module. My Perl-fu is weak but would it technically be possible to enable clamavconnector using this module or another? I've been looking for a good excuse to learn Perl...
     
  9. WiredChris

    WiredChris Member
    PartnerNOC

    Joined:
    Aug 7, 2013
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    DataCenter Provider
  10. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    In addition, here is another note from that feature request that should be useful for other visitors to this thread:

    Thank you.
     
Loading...

Share This Page