If you want an empty and new mariadb installation ( or just want to reset the data dir to a default state ), and don’t want to ‘purge’ the installation first you can do it simply:
First stop your mariadb/mysql server with:
Perpetually incomplete
If you want an empty and new mariadb installation ( or just want to reset the data dir to a default state ), and don’t want to ‘purge’ the installation first you can do it simply:
First stop your mariadb/mysql server with:
If you already have aws-cli installed and want to send a file to Amazon S3 it’s really easy:
Sending files ‘by hand’ is all good, but if you are serious about backups you need to automate the process, here is a quick and dirty backup script.
It lists, tars, bzips and individually uploads all the directories under the path you specify o the script.
You just need to set the variables at lines 5, 6, 7 and 8.
Continue reading “AWS S3 Backup Guide 2, aws-cli”
If you don’t have ( or don’t want ) aws-cli installed you can upload files under 5gb with the following script:
If you want to use and old computer as a dynamic DNS client to update you IP you can easily do it using the Cloudflare API and a Debian minimal install.
First install the API with:
After create a file somewhere with the code bellow, changing lines 105, 109, 110 and 115 as required.
Continue reading “Cloudflare Dynamic DNS”
Once in a while you may want to be able to pass information from the apache server to the php-fpm process, a way of doing it is by using environment variables, you can set them either in .htaccess files or in your virtual host configuration files.
You can set one variable per line as the following in your file of choice:
Continue reading “Setting Enviroment Variables for PHP-FPM with Apache”
If you are having problems with apt and IPv6 a temporary solution is to use the option ‘Acquire::ForceIPv4=true’ by appending ‘-o Acquire::ForceIPv4=true’ at the end of the apt command.
If you want a more permanent solution you can disable the usage of IPv6 with apt altogether with:
https://unix.stackexchange.com/questions/9940/convince-apt-get-not-to-use-ipv6-method
Trailing in the deeps of the interwebs, I found an interesting Post, It teaches how to disable the root check for the VLC media player.
As some may know VLC rightfully refuses to run as root, and why you would want to run a video player as root is beyond me, but the post explain in some detail how to use a hex editor to search and alter the call to the ‘geteuid()’ function to a call of the ‘getppid()’ function effectively neutering the root check.
Continue reading “Bad Idea of the day, Disabling VLC root check”
If you run a lot of Virtual Machines using qemu, you probably can save a lot of memory, at the expense of CPU cycles, by enabling Kernel Samepage Merging (KSM).
If you just want to test it and run only on the current boot run the following:
After testing if you want to enable it permanently you can use systemd temporary files.
Continue reading “Enable KSM Centos7/Debian”
The installation of a self hosted Gitlab instance using SSL certificates from Let’sEncrypt on a Centos 7 is simple and straightforward.
Run as root the following, remember to change Gitlab.example.com with the domain you intend to use for your Gitlab installation
Continue reading “Gitlab on-premisses install + Let’s Encrypt”
If you’ve been bitten by the following bug during the installation of the certbot DNS auth plugin for route53.
Continue reading “Install python2-certbot-dns-route53 centos 7”