Viewing incoming HTTP requests can be using for finding a high amount of requests going to a certain domain on your server.
To view all HTTP GET requests, run the following command as root:
tcpdump -s 0 -A \'tcp[((tcp[12:1] & 0xf0) >> 2):4] = 0x47455420\'
For HTTP POST requests run the following:
tcpdump -s 0 -A \'tcp[((tcp[12:1] & 0xf0) >> 2):4] = 0x504f5354\'
If you have a directory with a large amount of file, you may want to delete all files before a certain date.
With the below example, we can delete all files before 2016-01-01 00:00.
touch -t 201601010000 /tmp/timestamp
find . -type f ! -newer /tmp/timestamp -delete
Format for cron jobs
mi h d m w command
Run at ten minutes past the hour, every hour, day etc.
10 * * * * ls
Run every five minutes, on the 6th hour, every day etc.
*/5 6 * * * ls
Run on the 14th, 29th, 44th and 59th minute of every hour etc.
14,29,44,59 * * * * ls
>/dev/null 2>&1 to a cron job to silence all output.
The following example sends STDOUT (1) and STDERR (2) to /dev/null, effectively silencing all output.
0 0 * * * /bin/bash /opt/somescript.sh >/dev/null 2>&1
To watch a file for changes, you can do this with auditctl with the following command:
auditctl -w /path/to/filename -p wa
All changes will then be shown in the audit log (/var/log/audit/audit.log)
tail -f /var/log/audit/audit.log
Once you have found what you\'re looking for, remove the watch with the following:
auditctl -W /path/to/filename -p wa
Find the correct release RPM for your version of CentOS from the MySQL Download Page (https://dev.mysql.com/downloads/repo/yum/)
CentOS release 6.8 (Final)
yum localinstall mysql57-community-release-el6-9.noarch.rpm
Edit the following file and enable the version of MySQL that you want to upgrade to. Also ensure you disable the ones you don\'t want.
yum update mysql-server
If you\'re using Plesk, you will need to run mysql_upgrade with the following parameters:
mysql_upgrade -uadmin -p`cat /etc/psa/.psa.shadow`