How to stop and disable some unnecessary services
Posted: Fri Aug 26, 2022 11:04 pm
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)
SpamAssassin (scan incoming emails against spam):
Dovecot (provide IMAP and POP3 access):
ProFTPD (provides FTP access):
Fail2ban (blocks bots from brute-force attack (guessing the passwords) on ssh/ftp/imap/pop3/smtp):
Bind or Bind9 is an open source implementation of DNS, available for almost all Linux distributions. BIND stands Berkeley Internet Name Domain & it allows us to publish DNS information on internet as well as allows us to resolve DNS queries for the users. BIND is by far the most used DNS software on Internet.
Disable Bind9 ONLY if you are using external DNS Nameservers (such as CloudFlare)
Stop certain PHP-FPM version (instead of 8.2 you can insert desired version)
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
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
Code: Select all
systemctl stop dovecot.service
systemctl stop dovecot.socket
systemctl disable dovecot.service
Code: Select all
systemctl stop proftpd.service
systemctl disable proftpd.service
Code: Select all
systemctl stop fail2ban.service
systemctl disable fail2ban.service
Disable Bind9 ONLY if you are using external DNS Nameservers (such as CloudFlare)
Code: Select all
systemctl stop bind9
systemctl disable bind9
Code: Select all
systemctl stop php8.2-fpm
systemctl disable php8.2-fpm