Skip to content

Category: Linux

Using jq in Bash to manage JSON content

No doubt you already use Bash for a wide range of tasks, consequently are already aware it’s purely a procedural scripting language and not object oriented? For the majority of tasks this is fine, however there are times when objects are useful; enter jq, a lightweight and flexible command-line JSON processor. This post explains how to use jq to convert data into JSON and therefore an object. Say you have a file in /root/ with…

Leave a Comment

SSH User and Key Management

Managing users and more importantly SSH keys across numerous Linux systems can be the bane of any sysadmin’s life. There are tools out there which make this easier, however some don’t work very well, some are complicated and others are costly. All of them tend to require additional software installing and being configured. Essentially there is a simple solution, have the user’s SSH public keys stored in a remote location and have a script which…

Leave a Comment

Linux DRBD Setup

This tutorial will explain how to create a two node DRBD cluster (block level clustered storage), additional nodes can be added easily. For the purpose of this tutorial (and because I believe it to be the easiest distribution) I will be using Ubuntu Server 12.04 LTS. This will work on other Linux distributions but this guide is written specifically for Ubuntu. This tutorial will assume you are using the root user. For the purposes of…

Leave a Comment

Linux LVS Load Balancer Setup

This tutorial will explain how to create a software load balancer using the Linux kernel, LVS or IPVS load balancing. For the purpose of this tutorial (and because I believe it to be the easiest distribution) I will be using Ubuntu Server 12.04 LTS. This will work on other Linux distributions but this guide is written specifically for Ubuntu. This tutorial will assume you are using the root user. For the purposes of this tutorial…

Leave a Comment