How to stop and disable some unnecessary services

Post Reply
User avatar
myVesta
Site Admin
Posts: 748
Joined: Fri Jun 19, 2020 9:59 am

If you have small RAM, you can stop and disable some services.

ClamAV (scan incoming emails against viruses, sometimes this service can take up to 2GB of RAM)

Code: Select all

systemctl stop clamav-daemon.service
systemctl disable clamav-daemon.service

systemctl stop clamav-freshclam.service
systemctl disable clamav-freshclam.service

sed -i "s/^CLAMD =/#CLAMD =/g" /etc/exim4/exim4.conf.template
systemctl restart exim4
SpamAssassin (scan incoming emails against spam):

Code: Select all

systemctl stop spamassassin.service
systemctl disable spamassassin.service

sed -i "s/^SPAMASSASSIN =/#SPAMASSASSIN =/g" /etc/exim4/exim4.conf.template
sed -i "s/^SPAM_SCORE =/#SPAM_SCORE =/g" /etc/exim4/exim4.conf.template
systemctl restart exim4
Dovecot (provide IMAP and POP3 access):

Code: Select all

systemctl stop dovecot.service
systemctl stop dovecot.socket
systemctl disable dovecot.service
ProFTPD (provides FTP access):

Code: Select all

systemctl stop proftpd.service
systemctl disable proftpd.service
Fail2ban (blocks bots from brute-force attack (guessing the passwords) on ssh/ftp/imap/pop3/smtp):

Code: Select all

systemctl stop fail2ban.service
systemctl disable fail2ban.service
Post Reply