How to run clamd by systemd as daemon on Centos 7How to set environment variable in systemd service?Suddenly...
A variation to the phrase "hanging over my shoulders"
Why do Radio Buttons not fill the entire outer circle?
Does an advisor owe his/her student anything? Will an advisor keep a PhD student only out of pity?
Non-trope happy ending?
Why is so much work done on numerical verification of the Riemann Hypothesis?
What features enable the Su-25 Frogfoot to operate with such a wide variety of fuels?
How much theory knowledge is actually used while playing?
Biological Blimps: Propulsion
Review your own paper in Mathematics
Why is the Sun approximated as a black body at ~ 5800 K?
When were female captains banned from Starfleet?
Is my low blitz game drawing rate at www.chess.com an indicator that I am weak in chess?
Can you use Vicious Mockery to win an argument or gain favours?
PTIJ: Why is Haman obsessed with Bose?
What does Apple's new App Store requirement mean
Stack Interview Code methods made from class Node and Smart Pointers
Pre-mixing cryogenic fuels and using only one fuel tank
C++ copy constructor called at return
Does Doodling or Improvising on the Piano Have Any Benefits?
Does the reader need to like the PoV character?
Why is it that I can sometimes guess the next note?
The Digit Triangles
Why is the "ls" command showing permissions of files in a FAT32 partition?
How can I write humor as character trait?
How to run clamd by systemd as daemon on Centos 7
How to set environment variable in systemd service?Suddenly mysql/mariadb won't startDocker (systemd) ignores change of default directory (docker.service)from external host, i cant access to my apache web server that running on vmware [centos 7 64bit]Service php-fpm does not get user permissionsInstall rsync 3.1.1 on systemdfirewall-cmd on OpenVZ CentOS 7Failed to find Linux Kernel Module'systemctl restart service' not working on CentOS 7systemctl stops Tomcat service immediately after start
# rpm -q centos-release
centos-release-7-5.1804.el7.centos.2.x86_64
# rpm -qa clam
clamav-filesystem-0.100.0-2.el7.noarch
clamav-data-0.100.0-2.el7.noarch
clamav-lib-0.100.0-2.el7.x86_64
clamav-update-0.100.0-2.el7.x86_64
clamav-server-systemd-0.100.0-2.el7.x86_64
clamav-devel-0.100.0-2.el7.x86_64
clamav-scanner-systemd-0.100.0-2.el7.x86_64
clamd-0.100.0-2.el7.x86_64
clamav-0.100.0-2.el7.x86_64
Below clamd@.service
as is.
# cat /usr/lib/systemd/system/clamd@.service
[Unit]
Description = clamd scanner (%i) daemon
After = syslog.target nss-lookup.target network.target
[Service]
Type = forking
ExecStart = /usr/sbin/clamd -c /etc/clamd.d/%i.conf
Restart = on-failure
I use the standard config with defaults settings
# /etc/clamd.d/mail.conf
LogSyslog yes
TCPSocket 3310
TCPAddr 127.0.0.1
User clamscan
start
After start no any errors
# systemctl start clamd@mail
09:02:35 -- clamd[3644]: Limits: Global size limit set to 104857600 bytes.
09:03:39 -- clamd[3664]: Received 0 file descriptor(s) from systemd.
09:03:39 -- clamd[3664]: clamd daemon 0.100.0 (OS: linux-gnu, ARCH: x86_64, CPU: x86_64)
09:03:39 -- clamd[3664]: Running as user clamscan (UID 992, GID 989)
09:03:39 -- clamd[3664]: Log file size limited to 1048576 bytes.
09:03:39 -- clamd[3664]: Reading databases from /var/lib/clamav
09:03:39 -- clamd[3664]: Not loading PUA signatures.
09:03:39 -- clamd[3664]: Bytecode: Security mode set to "TrustSigned".
09:04:01 -- clamd[3664]: Loaded 6575820 signatures.
09:04:08 -- clamd[3664]: TCP: Bound to [127.0.0.1]:3310
09:04:08 -- clamd[3664]: TCP: Setting connection queue length to 200
status
# systemctl status clamd@mail
● clamd@rspamd.service - clamd scanner (rspamd) daemon
Loaded: loaded (/usr/lib/systemd/system/clamd@.service; static; vendor preset: disabled)
Active: inactive (dead)
# lsof -i | grep 3310
Empty
Looks like the service was not run as daemon. I tried to edit the /usr/lib/systemd/system/clamd@.service
, but got no expected result (it always restart)
[Service]
Type = simple
ExecStart = /usr/sbin/clamd -c /etc/clamd.d/%i.conf --foreground=yes
Restart = on-failure
centos7 systemd systemctl
bumped to the homepage by Community♦ 2 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
migrated from stackoverflow.com Jul 19 '18 at 2:29
This question came from our site for professional and enthusiast programmers.
add a comment |
# rpm -q centos-release
centos-release-7-5.1804.el7.centos.2.x86_64
# rpm -qa clam
clamav-filesystem-0.100.0-2.el7.noarch
clamav-data-0.100.0-2.el7.noarch
clamav-lib-0.100.0-2.el7.x86_64
clamav-update-0.100.0-2.el7.x86_64
clamav-server-systemd-0.100.0-2.el7.x86_64
clamav-devel-0.100.0-2.el7.x86_64
clamav-scanner-systemd-0.100.0-2.el7.x86_64
clamd-0.100.0-2.el7.x86_64
clamav-0.100.0-2.el7.x86_64
Below clamd@.service
as is.
# cat /usr/lib/systemd/system/clamd@.service
[Unit]
Description = clamd scanner (%i) daemon
After = syslog.target nss-lookup.target network.target
[Service]
Type = forking
ExecStart = /usr/sbin/clamd -c /etc/clamd.d/%i.conf
Restart = on-failure
I use the standard config with defaults settings
# /etc/clamd.d/mail.conf
LogSyslog yes
TCPSocket 3310
TCPAddr 127.0.0.1
User clamscan
start
After start no any errors
# systemctl start clamd@mail
09:02:35 -- clamd[3644]: Limits: Global size limit set to 104857600 bytes.
09:03:39 -- clamd[3664]: Received 0 file descriptor(s) from systemd.
09:03:39 -- clamd[3664]: clamd daemon 0.100.0 (OS: linux-gnu, ARCH: x86_64, CPU: x86_64)
09:03:39 -- clamd[3664]: Running as user clamscan (UID 992, GID 989)
09:03:39 -- clamd[3664]: Log file size limited to 1048576 bytes.
09:03:39 -- clamd[3664]: Reading databases from /var/lib/clamav
09:03:39 -- clamd[3664]: Not loading PUA signatures.
09:03:39 -- clamd[3664]: Bytecode: Security mode set to "TrustSigned".
09:04:01 -- clamd[3664]: Loaded 6575820 signatures.
09:04:08 -- clamd[3664]: TCP: Bound to [127.0.0.1]:3310
09:04:08 -- clamd[3664]: TCP: Setting connection queue length to 200
status
# systemctl status clamd@mail
● clamd@rspamd.service - clamd scanner (rspamd) daemon
Loaded: loaded (/usr/lib/systemd/system/clamd@.service; static; vendor preset: disabled)
Active: inactive (dead)
# lsof -i | grep 3310
Empty
Looks like the service was not run as daemon. I tried to edit the /usr/lib/systemd/system/clamd@.service
, but got no expected result (it always restart)
[Service]
Type = simple
ExecStart = /usr/sbin/clamd -c /etc/clamd.d/%i.conf --foreground=yes
Restart = on-failure
centos7 systemd systemctl
bumped to the homepage by Community♦ 2 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
migrated from stackoverflow.com Jul 19 '18 at 2:29
This question came from our site for professional and enthusiast programmers.
add a comment |
# rpm -q centos-release
centos-release-7-5.1804.el7.centos.2.x86_64
# rpm -qa clam
clamav-filesystem-0.100.0-2.el7.noarch
clamav-data-0.100.0-2.el7.noarch
clamav-lib-0.100.0-2.el7.x86_64
clamav-update-0.100.0-2.el7.x86_64
clamav-server-systemd-0.100.0-2.el7.x86_64
clamav-devel-0.100.0-2.el7.x86_64
clamav-scanner-systemd-0.100.0-2.el7.x86_64
clamd-0.100.0-2.el7.x86_64
clamav-0.100.0-2.el7.x86_64
Below clamd@.service
as is.
# cat /usr/lib/systemd/system/clamd@.service
[Unit]
Description = clamd scanner (%i) daemon
After = syslog.target nss-lookup.target network.target
[Service]
Type = forking
ExecStart = /usr/sbin/clamd -c /etc/clamd.d/%i.conf
Restart = on-failure
I use the standard config with defaults settings
# /etc/clamd.d/mail.conf
LogSyslog yes
TCPSocket 3310
TCPAddr 127.0.0.1
User clamscan
start
After start no any errors
# systemctl start clamd@mail
09:02:35 -- clamd[3644]: Limits: Global size limit set to 104857600 bytes.
09:03:39 -- clamd[3664]: Received 0 file descriptor(s) from systemd.
09:03:39 -- clamd[3664]: clamd daemon 0.100.0 (OS: linux-gnu, ARCH: x86_64, CPU: x86_64)
09:03:39 -- clamd[3664]: Running as user clamscan (UID 992, GID 989)
09:03:39 -- clamd[3664]: Log file size limited to 1048576 bytes.
09:03:39 -- clamd[3664]: Reading databases from /var/lib/clamav
09:03:39 -- clamd[3664]: Not loading PUA signatures.
09:03:39 -- clamd[3664]: Bytecode: Security mode set to "TrustSigned".
09:04:01 -- clamd[3664]: Loaded 6575820 signatures.
09:04:08 -- clamd[3664]: TCP: Bound to [127.0.0.1]:3310
09:04:08 -- clamd[3664]: TCP: Setting connection queue length to 200
status
# systemctl status clamd@mail
● clamd@rspamd.service - clamd scanner (rspamd) daemon
Loaded: loaded (/usr/lib/systemd/system/clamd@.service; static; vendor preset: disabled)
Active: inactive (dead)
# lsof -i | grep 3310
Empty
Looks like the service was not run as daemon. I tried to edit the /usr/lib/systemd/system/clamd@.service
, but got no expected result (it always restart)
[Service]
Type = simple
ExecStart = /usr/sbin/clamd -c /etc/clamd.d/%i.conf --foreground=yes
Restart = on-failure
centos7 systemd systemctl
# rpm -q centos-release
centos-release-7-5.1804.el7.centos.2.x86_64
# rpm -qa clam
clamav-filesystem-0.100.0-2.el7.noarch
clamav-data-0.100.0-2.el7.noarch
clamav-lib-0.100.0-2.el7.x86_64
clamav-update-0.100.0-2.el7.x86_64
clamav-server-systemd-0.100.0-2.el7.x86_64
clamav-devel-0.100.0-2.el7.x86_64
clamav-scanner-systemd-0.100.0-2.el7.x86_64
clamd-0.100.0-2.el7.x86_64
clamav-0.100.0-2.el7.x86_64
Below clamd@.service
as is.
# cat /usr/lib/systemd/system/clamd@.service
[Unit]
Description = clamd scanner (%i) daemon
After = syslog.target nss-lookup.target network.target
[Service]
Type = forking
ExecStart = /usr/sbin/clamd -c /etc/clamd.d/%i.conf
Restart = on-failure
I use the standard config with defaults settings
# /etc/clamd.d/mail.conf
LogSyslog yes
TCPSocket 3310
TCPAddr 127.0.0.1
User clamscan
start
After start no any errors
# systemctl start clamd@mail
09:02:35 -- clamd[3644]: Limits: Global size limit set to 104857600 bytes.
09:03:39 -- clamd[3664]: Received 0 file descriptor(s) from systemd.
09:03:39 -- clamd[3664]: clamd daemon 0.100.0 (OS: linux-gnu, ARCH: x86_64, CPU: x86_64)
09:03:39 -- clamd[3664]: Running as user clamscan (UID 992, GID 989)
09:03:39 -- clamd[3664]: Log file size limited to 1048576 bytes.
09:03:39 -- clamd[3664]: Reading databases from /var/lib/clamav
09:03:39 -- clamd[3664]: Not loading PUA signatures.
09:03:39 -- clamd[3664]: Bytecode: Security mode set to "TrustSigned".
09:04:01 -- clamd[3664]: Loaded 6575820 signatures.
09:04:08 -- clamd[3664]: TCP: Bound to [127.0.0.1]:3310
09:04:08 -- clamd[3664]: TCP: Setting connection queue length to 200
status
# systemctl status clamd@mail
● clamd@rspamd.service - clamd scanner (rspamd) daemon
Loaded: loaded (/usr/lib/systemd/system/clamd@.service; static; vendor preset: disabled)
Active: inactive (dead)
# lsof -i | grep 3310
Empty
Looks like the service was not run as daemon. I tried to edit the /usr/lib/systemd/system/clamd@.service
, but got no expected result (it always restart)
[Service]
Type = simple
ExecStart = /usr/sbin/clamd -c /etc/clamd.d/%i.conf --foreground=yes
Restart = on-failure
centos7 systemd systemctl
centos7 systemd systemctl
asked Jul 17 '18 at 9:30
vczmvczm
1
1
bumped to the homepage by Community♦ 2 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 2 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
migrated from stackoverflow.com Jul 19 '18 at 2:29
This question came from our site for professional and enthusiast programmers.
migrated from stackoverflow.com Jul 19 '18 at 2:29
This question came from our site for professional and enthusiast programmers.
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
The problem was in RAM. Used 512Mb, after increase it to 896Mb the problem was solved.
No need to use --foreground=all
to run the service. This parameter also can be use in /etc/clamd.d/mail.conf
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "2"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f922591%2fhow-to-run-clamd-by-systemd-as-daemon-on-centos-7%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
The problem was in RAM. Used 512Mb, after increase it to 896Mb the problem was solved.
No need to use --foreground=all
to run the service. This parameter also can be use in /etc/clamd.d/mail.conf
add a comment |
The problem was in RAM. Used 512Mb, after increase it to 896Mb the problem was solved.
No need to use --foreground=all
to run the service. This parameter also can be use in /etc/clamd.d/mail.conf
add a comment |
The problem was in RAM. Used 512Mb, after increase it to 896Mb the problem was solved.
No need to use --foreground=all
to run the service. This parameter also can be use in /etc/clamd.d/mail.conf
The problem was in RAM. Used 512Mb, after increase it to 896Mb the problem was solved.
No need to use --foreground=all
to run the service. This parameter also can be use in /etc/clamd.d/mail.conf
answered Jul 17 '18 at 11:15
vczmvczm
1
1
add a comment |
add a comment |
Thanks for contributing an answer to Server Fault!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f922591%2fhow-to-run-clamd-by-systemd-as-daemon-on-centos-7%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown