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”

How to remove unused kernel images from CentOS/RHEL systems

Every time you update your CentOS Linux and the update includes a new kernel image update the system will not remove your old kernel but it will cumulatively add new kernel to the top of your Linux kernel installed list. Normally, this does not present any issue to your running system and you are not required to take any action to remove any old and unused kernel images.

Continue reading “How to remove unused kernel images from CentOS/RHEL systems”

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”

Setup VNC for remote access on Raspberry Pi

Most of the time, I’m using SSH to connect remotely with the Raspberry Pi. If you are more accustomed to a GUI, you can use VNC for remote access via the network. With VNC, you can access your Raspberry Pi’s GUI screen from a laptop or desktop computer using the same mouse, keyboard, and display of your own computer. Here’s the steps you need to do to setup a working VNC server/client to access your Raspberry Pi remotely. This is an tutorial done  on Raspbian OS.

Continue reading “Setup VNC for remote access on Raspberry Pi”

Configuring Elastic Load Balancer on Amazon EC2

Load balancers are used to distribute the requests/queries to multiple server instances. Most web infrastructures have multiple front-end servers that share the load of the application. Although there are multiple server instances, the end-user only see them a single node. In this tutorial, I’ll walk you on how to configure an Elastic Load Balancer on Amazon, add your web server nodes and point your domain name to the EC2 load balancer.

Continue reading “Configuring Elastic Load Balancer on Amazon EC2”

Cloning your Instances on Amazon EC2

Multiple front-end web server setups are almost always in use these days. Instead of just one server serving web traffic, you create two or more servers which will share the load evenly to serve requests from users. These servers usually connect to a backend database server. On this tutorial, we’ll walk through the steps on adding another web-front end server by cloning you current web server node.

Continue reading “Cloning your Instances on Amazon EC2”

Adding new disk on Amazon EC2 instance Centos/RHEL 6

Amazon VPS instances, by default only have a single disk for the whole filesystem of the server. Unless you chose to add an additional disk when you provision the server, adding disk space to your VPS can be tricky. Here’s a run down on how to add more storage to your server on amazon by mounting a new drive.

In this tutorial, I’ve mounted the new drive to /var/lib/mysql since I need to increase the disk space used by the database. This tutorial is still applicable even if you want to increase a different folder. The process will be the same.

Continue reading “Adding new disk on Amazon EC2 instance Centos/RHEL 6”