clamav and clamscan on CentOS7
yum install -y epel-release; yum install -y clamav-server clamav-data clamav-update clamav-filesystem clamav clamav-scanner-systemd clamav-devel clamav-lib clamav-server-systemd
cp -v /usr/share/clamav/template/clamd.conf /etc/clamd.d/clamd.conf
perl -p -i -e 's/Example//g' /etc/clamd.d/clamd.conf
freshclam
The scan example:
clamscan -ir / >> /root/fullscan.`date +%d-%m-%Y_%H.%M`.report
Install AutoSSL for hostname and services in cPanel
How do not pass locale through ssh
It sounds like your SSH client is configured to forward the locale settings. You can prevent this by altering your configuration (the global file is typically /etc/ssh/ssh_config):
# comment out / remove the following line
SendEnv LANG LC_*
Alternatively you can change the configuration of the server, by editing /etc/ssh/sshd_config on the remote machine (note the d in sshd_config):
# comment out / remove the following line
AcceptEnv LANG LC_*
original post/page here
find which service is using a SWAP
one line search:
for file in /proc/*/status ; do awk '/VmSwap|Name/{printf $2 " " $3}END{ print ""}' $file; done | sort -k 2 -n -r | less
source: cyberciti.biz
2025 version, a bit tuned by me:
echo -e "NAME:\t\t PID:\t SWAP(kB):";for file in /proc/*/status ; do grep -w "VmSwap:\|Name:\|Pid:" $file|awk '/VmSwap|Name|Pid/{printf $2 " " $3}END{ print ""}';done|sort -k 3 -n -r|head -n 20|column -t
CSF advanced rules for outgoing connections for the local users
tcp/udp|in/out|s/d=port|s/d=ip|u=uid
good article and overview located here: Configserver Firewall and Security (CSF and LFD)
how to add the DNS record on cPanel based server from the command line
Media Server for the local network or how to share your media to your devices
Installation:
apt-get -y install minidlna
Configure:
echo "USER="root"" >> /etc/default/minidlna
in the file /etc/minidlna.conf replce
user=minidlna to user=root
Then need to update the path to directory with your media:
media_dir=/home/someuser/somemedia
and past the following lines in end of the config files:
friendly_name=SomeStorage # Optional
db_dir=/var/cache/minidlna # Needs to be un-commented
log_dir=/var/log # Needs to be un-commented
inotify=yes # 'no' for less resources, restart required for new media
Now time to start the service:
service minidlna restart
Short manual about the Cron
# For details see man 4 crontabs
# Example of job definition:
# .---------------- minute (0 - 59)
# | .------------- hour (0 - 23)
# | | .---------- day of month (1 - 31)
# | | | .------- month (1 - 12) OR jan,feb,mar,apr ...
# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# | | | | |
# * * * * * user-name command to be executed
*/1 * * * * /usr/local/rtm/bin/rtm 23 > /dev/null 2> /dev/null