All Linux HowTo's Scripting HowTo's Security HowTo's

Dump and Backup all MySQL Databases into their own files

This article demonstrates how to backup all MySQL databases into their own files and then tar the lot including system files. #!/bin/bash TO=”/root” FROM=”/etc /var/www/html /var/backups” DBUSER=”root” DBPASS=’MyPassword’ THISHOST=`hostname` DBLIST=`echo “show databases;” | mysql –password=$DBPASS -u $DBUSER | egrep -v ‘^Database$|^information_schema$|^mysql$’` for DBLOOP in `echo $DBLIST` do mysqldump -u $DBUSER

Read more
All Linux HowTo's Security HowTo's

Minimal Apache SSL Configuration (Redhat)

This document shows the minimal information you need to have a working Apache server serving HTTPS requests. It’s typical to put your configuration files in (when using Redhat) “/etc/httpd/conf.d/”. We’re using certificates supplied to us and not self signed certificates. <VirtualHost *:443> LogLevel warn SSLEngine on SSLCertificateFile /etc/httpd/keys/www.example.com.crt SSLCertificateKeyFile /etc/httpd/keys/www.example.com.key

Read more
All Linux HowTo's Security HowTo's

Install vsFTP on CentOS/Redhat and enable TLS

This tutorial demonstrates how to install vsftp on CentOS/Redhat and configure it to allow connections over TLS for additional security. We’ll also chroot the users to their own directory. Install vsftp: yum install vsftp Edit the config file “/etc/vsftpd/vsftpd.conf” and set the following: rsa_cert_file=/etc/vsftpd/vsftpd.pem rsa_private_key_file=/etc/vsftpd/vsftpd.pem chroot_local_user=YES anonymous_enable=NO ssl_enable=YES allow_anon_ssl=NO force_local_data_ssl=YES

Read more