APT Listing Packages – Ubuntu / Debian

Do you ever wonder how many thousands of packages are installed on your Linux system? Even a fairly modest Linux system is likely to have well over a thousand packages installed. And there are many ways to get details on what they are. Here are some of the most useful commands for gaining insights into the packages installed on your Linux system using APT on Ubuntu / Debian systems.

Continue reading “APT Listing Packages – Ubuntu / Debian”

Software RAID Recovery Tutorial

This tutorial will walk through the troubleshooting and recovery of a failed disk on a Software RAID setup. Especially mirroring the boot partition which is important when replacing disk and making sure the OS boots up properly after replacement.  This tutorial was done on Ubuntu 14.04 but should still work on other distributions such as RHEL and CentOS.

Continue reading “Software RAID Recovery Tutorial”

Redirect HTTP to HTTPS on Apache

SSL secured websites or HTTPS has now become a must to have on website, especially those handling sensitive client information. Having a HTTPS enabled website means that a intruder can’t intrude to communication between users and website. HTTPS not only secures communication but is now a requirement for many new features like http2, which requires you to have https enabled on your server. Having a HTTPS enabled website also improves your Google SEO (Search Engine Optimization) ranking.

In this tutorial, we will discuss two methods on how we can redirect http traffic to https on Apache web servers.
Continue reading “Redirect HTTP to HTTPS on Apache”

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”