Linux

Backup Webite to Amazon S3

Create file mkdir /usr/serverok/ vi /usr/serverok/backup-daily.sh Add #!/bin/bash BACKUP_FILE=”backup-`date +%Y-%m-%d`.tgz” /bin/tar –exclude-tag-under=no-backup -zcvhf /backup/$BACKUP_FILE /var/www/html/ aws s3 cp /backup/$BACKUP_FILE s3://S3_BUCKET_NAME/ rm -f…

logrotate

logrotate is a program to rotates logs. This is run daily using cronjob /etc/cron.daily/logrotate Logrotate config files are stored in /etc/logrotate.d/ To…

npm

To install npm on Ubuntu, run apt install npm To install a node package, run npm install mongodb@2.2 –save How to change…

sendy

Sendy cronjob */5 * * * * /usr/bin/curl –silent https://URL/scheduled.php &> /var/log/sendy.log Or */5 * * * * /usr/bin/php /var/www/html/scheduled.php > /dev/null…

fail2ban

To install fail2ban on Deban/Ubuntu, run To enable fail2ban start on boot and start it To view the status To resart fail2ban