Install MariaDB 10.1 on Ubuntu16.04

I have Ubuntu16.04 servers running and I want to run database engines like MariaDB on it. Normally I would just type sudo apt install mariadb-server and the database system would be up and running in under two minutes. Ubuntu16.04 will install version 10.0 by default, but I want to install a different version. At the very least 10.1. Why 10.1 you might ask? Well because 10.1 was the first release that had Galera included by default in the package. Galera is a gift from the gods for all system administrators, developers, backup operators and other people who work with databases a lot. With three nodes, the minimum, it will offer you fast and reliable database synchronization and redundancy. Galera is a solid foundation for an easy to build load balancing environment. But first of we will install the MariaDB 10.1 instance on a clean Ubuntu16.04 server. If you want to be absolutely certain that the instructions below will work flawlessly for you, I would advise to use a clean fresh installed server also. Please remember that upgrading (or downgrading) from a different release version is NOT a good idea. When I was learning this the hard way I did a lot of reading on the subject and I can safely say that you should not follow these instructions on a system that runs, or used to run a MariaDB or MySQL instance. Even if you have removed it first apt remove you are still at risk of running into problems. When I was having problems with this I tried many things that included killing the process: kill -9 $(pgrep mysql)  and then purging the removed packages apt purge and also apt autoremove and I even had to delete some left-over files manually. Don’t even try to install it on a system that ran a higher version > 10.1 because that will be guaranteed imminent failure. You’ve been warned! Let’s get started and install some required software and updates.

sudo apt update && sudo apt upgrade
sudo apt-get install nano ssh openssh-server software-properties-common rsync

To see the rest of this article please click on the read more link.

Continue reading

Disable IPv6 on Ubuntu 16.04 Permanently

If you want IPv6 disabled permanently on a Ubuntu 16.04 system, here’s a good way to do it. Disabling it like this should keep it disabled permanently, even after performing updates that could potentially enable it again without you knowing it. I haven’t tested it so I’m not 100% certain but if you decide to upgrade Ubuntu to 16.10 or the most recent version, it should still have ipv6 disabled after upgrading. Now let’s get to it! Simply enter the following commands in your console:

sudo echo "net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1" | sudo tee /etc/sysctl.d/99-my-disable-ipv6.conf
sudo service procps reload
ifconfig

The ifconfig should not show any ipv6 address. A reboot is not required, but it won’t hurt either.