Results 1 to 16 of 16

Thread: CXS guide for Directadmin

  1. #1
    Join Date
    Jul 2017
    Location
    Murfreesboro
    Posts
    353

    Lightbulb CXS guide for Directadmin

    This guide is for CentOS 7 and CXS 11
    You must have a License from the vendor for this product. I am not affiliated with csf.
    https://www.configserver.com/cp/cxs.html
    You may want the EPEL repo installed. This guide does not cover that if you need it.

    You must have Clamav in options.conf and installed.
    Code:
    cd /usr/local/directadmin/custombuild
    ./build set clamav yes
    ./build clamav


    Once you have clamav installed


    Go setup the clamd.conf


    Code:
    nano /etc/clamd.conf


    Find and set the below fields.


    Code:
    # Path to a local socket file the daemon will listen on.
    # Default: disabled (must be specified by a user)
    LocalSocket /run/clamd.socket
    
    
    # Sets the group ownership on the unix socket.
    # Default: disabled (the primary group of the user running clamd)
    LocalSocketGroup clamav
    
    
    # Sets the permissions on the unix socket to the specified mode.
    # Default: disabled (socket is world accessible)
    LocalSocketMode 660
    
    
    # Remove stale socket after unclean shutdown.
    # Default: yes
    FixStaleSocket yes


    Save


    Code:
    systemctl restart clamd


    You can use the below cmd to look for it. It took about a min or so for it to show.


    Code:
    find / -name "*clamd*"


    looking for /run/clamd.
    socket


    You will need to have the epel repo installed.

    Code:
    yum install sqlite perl-DBI perl-DBD-SQLite perl-Archive-Tar perl-IO-Zlib perl-Archive-Zip perl-libwww-perl perl-Compress-Zlib perl-LWP-Protocol-https perl-Linux-Inotify2 -y     
    wget https://download.configserver.com/cxsinstaller.tgz
    tar -xzf cxsinstaller.tgz
    perl cxsinstaller.pl
    rm -fv cxsinstaller.*
    echo clamdsock=/run/clamd.socket >> /etc/cxs/cxs.defaults


    Now head over to DA login as admin
    Go to the Plugins Section.

    You should see CXS installed


    Once you go thought the wizard and set your answers to the questions.


    You should be presented with the CXS screen.

    Troubleshooting:


    If you get the big red message about Clam not being installed


    Check you set the socket in /etc/cxs/cxs.defaults

    Should be clamdsock=/run/clamd.socket


    If it in there and still red check the /etc/clamd.conf


    Make sure you saved and uncommented like above.


    Hope this helps. If you find errors about perl module post back. I think I got them all but not totally sure.
    Last edited by bdacus01; 09-28-2019 at 08:04 AM.
    Thanks,
    Brent Dacus
    Just a regular guy from Tennessee

    CentOS 7 | DA | CB 2.0 | MariaDB 10.4 | PHP 7.2

    help me...it's HERE or Type "your issue your os directadmin" in google


  2. #2
    Join Date
    Oct 2008
    Posts
    323
    Hi
    Excellent guide.

    I succesful installed, I got the following error:
    No package perl-Linux-Inotify2 available.

    THe problem is that I am unable to get on admin GUI.
    Can you give me a clue?

    Regards
    ==
    Dependecy solved by epel-release
    Last edited by urgido; 07-18-2019 at 11:07 PM.

  3. #3
    Join Date
    Jul 2017
    Location
    Murfreesboro
    Posts
    353
    Quote Originally Posted by urgido View Post
    Hi
    Excellent guide.

    I succesful installed, I got the following error:
    No package perl-Linux-Inotify2 available.

    THe problem is that I am unable to get on admin GUI.
    Can you give me a clue?

    Regards
    ==
    Dependecy solved by epel-release
    Great. And yes you need epel
    Thanks,
    Brent Dacus
    Just a regular guy from Tennessee

    CentOS 7 | DA | CB 2.0 | MariaDB 10.4 | PHP 7.2

    help me...it's HERE or Type "your issue your os directadmin" in google


  4. #4
    Join Date
    Oct 2008
    Posts
    323
    Do you know how I can get cxs on directadmin GUI? I don't have a problem using cxs on ssh but it's more easily through DA.

    Thanks

  5. #5
    Join Date
    Jul 2017
    Location
    Murfreesboro
    Posts
    353
    Quote Originally Posted by urgido View Post
    Do you know how I can get cxs on directadmin GUI? I don't have a problem using cxs on ssh but it's more easily through DA.

    Thanks
    If you followed my guide its there in admin plug-in section
    Thanks,
    Brent Dacus
    Just a regular guy from Tennessee

    CentOS 7 | DA | CB 2.0 | MariaDB 10.4 | PHP 7.2

    help me...it's HERE or Type "your issue your os directadmin" in google


  6. #6
    Join Date
    Jul 2019
    Posts
    29
    Quote Originally Posted by bdacus01 View Post
    This guide is for CentOS 7 and CXS 11
    You must have a License from the vendor for this product. I am not affiliated with csf.
    https://www.configserver.com/cp/cxs.html


    You must have Clamav in options.conf and installed.
    Code:
    cd /usr/local/directadmin/custombuild
    ./build set clamav yes
    ./build clamav


    Once you have clamav installed


    Go setup the clamd.conf


    Code:
    nano /etc/clamd.conf


    Find and set the below fields.


    Code:
    # Path to a local socket file the daemon will listen on.
    # Default: disabled (must be specified by a user)
    LocalSocket /run/clamd.socket
    
    
    # Sets the group ownership on the unix socket.
    # Default: disabled (the primary group of the user running clamd)
    LocalSocketGroup clamav
    
    
    # Sets the permissions on the unix socket to the specified mode.
    # Default: disabled (socket is world accessible)
    LocalSocketMode 660
    
    
    # Remove stale socket after unclean shutdown.
    # Default: yes
    FixStaleSocket yes


    Save


    Code:
    systemctl restart clamd


    You can use the below cmd to look for it. It took about a min or so for it to show.


    Code:
    find / -name "*clamd*”


    looking for /run/clamd.soket



    You will need to have the epel repo installed.

    Code:
    yum install sqlite perl-DBI perl-DBD-SQLite perl-Archive-Tar perl-IO-Zlib perl-Archive-Zip perl-libwww-perl perl-Compress-Zlib perl-LWP-Protocol-https perl-Linux-Inotify2 -y     
    wget https://download.configserver.com/cxsinstaller.tgz
    tar -xzf cxsinstaller.tgz
    perl cxsinstaller.pl
    rm -fv cxsinstaller.*
    echo clamdsock=/run/clamd.socket >> /etc/cxs/cxs.defaults


    Now head over to DA login as admin
    Go to the Plugins Section.

    You should see CXS installed


    Once you go thought the wizard and set you answers to the questions.


    You should be presented with the CXS screen.

    Troubleshooting:


    If you get the big red message about Clam not being installed


    Check you set the socket in /etc/cxs/cxs.defaults

    Should be clamdsock=/run/clamd.socket


    If it in there and still red check the /etc/clamd.conf


    Make sure you saved and uncommented like above.


    Hope this helps. If you find errors about perl module post back. I think I got them all but not totally sure.
    This step dead

    just follow these step

    yum install dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

    yum install perl-libwww-perl.noarch perl-LWP-Protocol-https.noarch perl-Archive-Tar.noarch perl-Archive-Zip.noarch perl-Linux-Inotify2 perl-Compress-Zlib sqlite perl-DBI perl-DBD-SQLite
    The clamd process must run as root and create a unix socket. To do this,
    edit /etc/clamd.conf and set:

    User root
    LocalSocket /tmp/clamd.socket


    wget download.configserver.com/cxsinstaller.tgz
    tar -xzf cxsinstaller.tgz
    perl cxsinstaller.pl

  7. #7
    Join Date
    Jul 2019
    Posts
    79
    Hello,

    Error:
    ClamAV socket [/tmp/clamd.socket] not found

    You must install ClamAV (Clamavconnector on cPanel) or ensure clamd is running to use this product correctly
    If the clamd socket is not automatically detected, and to clear this message, you must set clamdsock=/path/to/socket in /etc/cxs/cxs.defaults to the live socket location,




    Thanks,
    Melih

  8. #8
    Join Date
    Jul 2019
    Posts
    29
    Quote Originally Posted by kebirhost View Post
    Hello,

    Error:
    ClamAV socket [/tmp/clamd.socket] not found

    You must install ClamAV (Clamavconnector on cPanel) or ensure clamd is running to use this product correctly
    If the clamd socket is not automatically detected, and to clear this message, you must set clamdsock=/path/to/socket in /etc/cxs/cxs.defaults to the live socket location,




    Thanks,
    Melih
    Check you set the socket in /etc/cxs/cxs.defaults

    Should be clamdsock=/run/clamd.socket

  9. #9
    Join Date
    Jul 2019
    Posts
    79
    Hello,

    Yes but you wrote this:
    The clamd process must run as root and create a unix socket. To do this,
    edit /etc/clamd.conf and set:

    User root
    LocalSocket /tmp/clamd.socket


    wget download.configserver.com/cxsinstaller.tgz
    tar -xzf cxsinstaller.tgz
    perl cxsinstaller.pl


    on the post.

    Melih

  10. #10
    Join Date
    Mar 2018
    Posts
    14
    Hi,

    Great guide, just a few typos to make copy-pasting easier:

    Code:
    looking for /run/clamd.soket -> /run/clamd.socket
    Code:
    find / -name "*clamd* -> "*clamd*"
    You may also consider adding epel-release to yum list, other than that it's a really helpful guide.

  11. #11
    Join Date
    Jul 2017
    Location
    Murfreesboro
    Posts
    353
    Thanks typos corrected.
    Thanks,
    Brent Dacus
    Just a regular guy from Tennessee

    CentOS 7 | DA | CB 2.0 | MariaDB 10.4 | PHP 7.2

    help me...it's HERE or Type "your issue your os directadmin" in google


  12. #12
    Join Date
    Jul 2019
    Posts
    79
    Hello,

    How can i fix this isssue?

    # Clamd Error for [SCAN /tmp/cxs_H4D4oa3NhWxmkvD5PlqqCa7bEus.1]: /tmp/cxs_H4D4oa3NhWxmkvD5PlqqCa7bEus.1: lstat() failed: No such file or directory. ERROR

    # Clamd Error for [SCAN /tmp/cxs_T3EpkoQWHi7XGpSqmiHhxZsv6HR.1]: /tmp/cxs_T3EpkoQWHi7XGpSqmiHhxZsv6HR.1: lstat() failed: No such file or directory. ERROR

    # Clamd Error for [SCAN /tmp/cxs_aW7vXr0R3Ham1H0Jtq4OXzmoMLm.1]: /tmp/cxs_aW7vXr0R3Ham1H0Jtq4OXzmoMLm.1: lstat() failed: No such file or directory. ERROR

    # Clamd Error for [SCAN /tmp/cxs_w7gPwagZ5y8vbDGfWZz.1]: /tmp/cxs_w7gPwagZ5y8vbDGfWZz.1: lstat() failed: No such file or directory. ERROR

    # Clamd Error for [SCAN /tmp/cxs_8WXsVAJmBzwdGxQgtP.1]: /tmp/cxs_8WXsVAJmBzwdGxQgtP.1: lstat() failed: No such file or directory. ERROR

    # Clamd Error for [SCAN /tmp/cxs_4urE3Qmm9IapOIJ7Mr0y.1]: /tmp/cxs_4urE3Qmm9IapOIJ7Mr0y.1: lstat() failed: No such file or directory. ERROR

    # Clamd Error for [SCAN /tmp/cxs_a5AHzMYVTYPYiohQvL6e8.1]: /tmp/cxs_a5AHzMYVTYPYiohQvL6e8.1: lstat() failed: No such file or directory. ERROR


    Thanks,
    Melih

  13. #13
    Join Date
    Jul 2017
    Location
    Murfreesboro
    Posts
    353
    Quote Originally Posted by kebirhost View Post
    Hello,

    How can i fix this issue?

    # Clamd Error for [SCAN /tmp/cxs_H4D4oa3NhWxmkvD5PlqqCa7bEus.1]: /tmp/cxs_H4D4oa3NhWxmkvD5PlqqCa7bEus.1: lstat() failed: No such file or directory. ERROR

    Thanks,
    Melih
    Hey Melih
    Do you get these errors during the Install process? OR after you have configured everything? Also if you have a license to CXS you might try their forum. They support directadmin as Beta now. https://forum.configserver.com/viewforum.php?f=26
    Thanks,
    Brent Dacus
    Just a regular guy from Tennessee

    CentOS 7 | DA | CB 2.0 | MariaDB 10.4 | PHP 7.2

    help me...it's HERE or Type "your issue your os directadmin" in google


  14. #14
    Join Date
    Jul 2019
    Posts
    79
    Hello,

    I installed according to your suggestions. There is no issue on this process but after scanning, i think clamav does not scan.

    Thanks,
    Melih

  15. #15
    Join Date
    Jul 2017
    Location
    Murfreesboro
    Posts
    353
    in the wizards did you set all of the options you wanted like in Virus scanning?
    Screen Shot 2019-09-30 at 12.30.50.png
    Thanks,
    Brent Dacus
    Just a regular guy from Tennessee

    CentOS 7 | DA | CB 2.0 | MariaDB 10.4 | PHP 7.2

    help me...it's HERE or Type "your issue your os directadmin" in google


  16. #16
    Join Date
    Jul 2019
    Posts
    11
    Quote Originally Posted by kebirhost View Post
    Hello,

    How can i fix this isssue?

    # Clamd Error for [SCAN /tmp/cxs_H4D4oa3NhWxmkvD5PlqqCa7bEus.1]: /tmp/cxs_H4D4oa3NhWxmkvD5PlqqCa7bEus.1: lstat() failed: No such file or directory. ERROR

    # Clamd Error for [SCAN /tmp/cxs_T3EpkoQWHi7XGpSqmiHhxZsv6HR.1]: /tmp/cxs_T3EpkoQWHi7XGpSqmiHhxZsv6HR.1: lstat() failed: No such file or directory. ERROR

    # Clamd Error for [SCAN /tmp/cxs_aW7vXr0R3Ham1H0Jtq4OXzmoMLm.1]: /tmp/cxs_aW7vXr0R3Ham1H0Jtq4OXzmoMLm.1: lstat() failed: No such file or directory. ERROR

    # Clamd Error for [SCAN /tmp/cxs_w7gPwagZ5y8vbDGfWZz.1]: /tmp/cxs_w7gPwagZ5y8vbDGfWZz.1: lstat() failed: No such file or directory. ERROR

    # Clamd Error for [SCAN /tmp/cxs_8WXsVAJmBzwdGxQgtP.1]: /tmp/cxs_8WXsVAJmBzwdGxQgtP.1: lstat() failed: No such file or directory. ERROR

    # Clamd Error for [SCAN /tmp/cxs_4urE3Qmm9IapOIJ7Mr0y.1]: /tmp/cxs_4urE3Qmm9IapOIJ7Mr0y.1: lstat() failed: No such file or directory. ERROR

    # Clamd Error for [SCAN /tmp/cxs_a5AHzMYVTYPYiohQvL6e8.1]: /tmp/cxs_a5AHzMYVTYPYiohQvL6e8.1: lstat() failed: No such file or directory. ERROR


    Thanks,
    Melih
    1. check your out put
    Code:
     cat   /etc/systemd/system/httpd.service
    if you have

    PrivateTmp=true
    edit the file
    /etc/systemd/system/httpd.service

    change
    PrivateTmp= true

    to

    PrivateTmp=false
    and restart apache

    Code:
    service httpd restart
    this should fix your issue

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •