Setup Master Slave replication in MariaDB

Databases are arguably one of the main component of any modern application. And one of the most popular implementation of SQL databases is Mysql or the new replacement MariaDB. As a system administrator, you probably have installed and configured a database before. This tutorial will walk though setting up the master-slave replication of MariaDB.
Continue reading “Setup Master Slave replication in MariaDB”

Recover disk usage after deleting large file in Linux

Disks getting full on Linux is a common scenario any administrator have probably experienced. There are usually some large files in /var/log directory that can be compressed or deleted to save disk space. Have you ever experienced deleting a large log file and noticed that the disk usage remained the same ? It’s as if the file size usage is not released even though you’ve deleted it?

This scenario can happen if you deleted/renamed/moved an existing file that is currently in use by a running program. This usually happens on log files that are not rotated regularly and then when the file size becomes large, you deleted (or compressed) the file without even checking if it is in-use. Don’t worry, you can still recover your disk space as shown from the example below.

Continue reading “Recover disk usage after deleting large file in Linux”

Installing OS to Raspberry Pi using Windows

This tutorial will walk through installation of OS for the the Raspberry Pi.

The Raspberry Pi will not start without a properly formatted SD Card, containing the bootloader and a suitable operating system. Most of the  problems with booting the Raspberry Pi are a result of an improperly formatted or corrupted card. Make sure that you insert the card before powering on the Raspberry Pi, and that you shutdown the Raspberry Pi before unplugging the card.

First, you will also need to choose a distribution – the OS you want to for the Raspberry Pi. Note that you can have several SD Cards with a separate distribution on each, then power off, swap cards and restart the Raspberry Pi to use that card.

Continue reading “Installing OS to Raspberry Pi using Windows”

Linux iptables Configuration Tutorial

Iptables is an extremely flexible command-line firewall utility built for Linux operating systems. It uses policy chains to allow or block traffic. When a connection tries to establish itself on your system, iptables looks for a rule in its list to match it to. If it doesn’t find one, it resorts to the default action. Securing any server will surely require a firewall configuration and iptables should be on every system admins toolbox.
Continue reading “Linux iptables Configuration Tutorial”

What’s in the /etc folder?

The standard Linux directory structure mostly follows the POSIX Filesystem Hierarchy Standard. One of the system folders most commonly edited or modified is the /etc directory. Here’s a summary of what files/folders should you expect to see here and what are their functions.
Mainly, the /etc contains system-global configuration files, which affects how programs run and how the behaves for all users.

Continue reading “What’s in the /etc folder?”

Important MySQL commands

The following tutorials are example of the essential MySQL commands and techniques needed by system administrators. Although there are people/departments that specializes on Database administration, knowing these commands will help you understand and collaborate effectively with database administrators.
Continue reading “Important MySQL commands”

Additional MySQL Commands

When you forgot the password to your MySQL server, you can reset it using the following steps. This will require a downtime since you are going to stop MySQL service. After this, remember to keep you mysql root password.

Continue reading “Additional MySQL Commands”