How to Configure a BIND Server on Ubuntu


Introduction Within this article, we will configure a BIND server within Ubuntu. The advantages of having a local DNS server include: Reduced latency to DNS requests/responses Ability to add private addresses and full flexibility of zone names. Especially useful for VMware installations. It is important to note that the steps provided, are based on a quick setup. Due … Read more

How do I add a Space to Selected Lines within VIM?

Introduction Most likey there will be a time (for one reason or another) where you need to insert a number of spaces to a set of lines within a text file.Within this short article we will show you how via the use of VIM. Steps 1. Within VIM select blockwise visual mode, by pressing CTRL-V.2. … Read more

A Brief Explanation of Kernel Space and User Space

Introduction Within the Linux kernel, knowing how memory is separated is extremely important. As knowing what programs reside where, and the requirement on the system to move memory from one place to another, can provide a huge insight into the performance, or lack of, within a system. And when it comes to the world of … Read more

What is MacVTap?

Definition MacVTap is a Linux device driver, based upon the combination of – Macvlan and TAP (descriptions below), that allows for the creation of virtual (tap-like) interfaces. Each virtual network interface is assigned its own MAC and IP address, then attached to the physical interface (also know as the lower interface), Macvlan – Linux kernel … Read more

The Journey of a Frame through a Linux Based System

Abstract The scope of this article is to describe, at a high level, the journey a frame takes through a Linux based system. NOTE This article does not cover Linux kernel performance issues and caveats, for more information around this please see pushing the limits of kernel networking. Ingress Lets first look at the path … Read more

What is the Difference between Apt-get Upgrade and Update?

The other day I asked myself, What is the difference between apt-get update and apt-get upgrade? As I’m sure many other people, at some point may ask the same, I thought I would share the answer. Quite simply, apt-get update – updates the list of available packages, and their versions. However it does NOT upgrade … Read more

Yum Error – Thread died in Berkeley DB library … Error: rpmdb open failed)

Issue When executing Yum you receive the following error, [[email protected] blog]# yum install npm rpmdb: Thread/process 3934/139752225695488 failed: Thread died in Berkeley DB library error: db3 error(-30974) from dbenv->failchk: DB_RUNRECOVERY: Fatal error, run database recovery error: cannot open Packages index using db3 – (-30974) error: cannot open Packages database in /var/lib/rpm CRITICAL:yum.main: Error: rpmdb open … Read more

A Beginners Guide to Git

What is Git? Git is a version control system that is used for software development and other version control tasks. As a distributed revision control system it is aimed at speed, data integrity, and support for distributed, non-linear workflows[1]. Create Repository To create a new repository, the command git init is used, within your directory. … Read more

How to Resolve a Git Merge Conflict from the Command Line

Git provides 3 types of merging, Fast-Forward, Automatic and Manual. A manual merge is required when git is unable to resolve any conflicts , this results in a merge conflict. Within this example we will generate a merge conflict and then manually resolve from within the command line. File First, lets look at the contents … Read more

How to Colorize the Git Output within your Shell

Git provides various global configuration options for colorizing the output.[1] In order to enable these options, run the following commands. This will, in turn update your ~/.gitconfig file. git config –global color.ui alwaysgit config –global color.branch alwaysgit config –global color.diff alwaysgit config –global color.interactive alwaysgit config –global color.status alwaysgit config –global color.grep alwaysgit config –global … Read more

How to Display your Local Git Branch in your BASH prompt

In order to make your life easier when working with git, this article provides the steps to display the current local git branch within your bash prompt. This not only saves you time, but also prevents the potential for human error by ensuring you are not making changes to the wrong branch. Download Script First … Read more

How to Set the Time Date and Timezone in Ubuntu

In this article we will show you how to set the time, date and timezone within Ubuntu. Steps Set the time zone Set the time and date Sync the hwclock with the current time and date Commands Below are the commands that are required. For the date command this will set the time and date … Read more

How to Configure the UFW Firewall

Introduction The Uncomplicated Firewall (ufw) is a frontend for iptables and is particularly well-suited for host-based firewalls. ufw provides a framework for managing netfilter, as well as a command-line interface for manipulating the firewall. ufw aims to provide an easy to use interface for people unfamiliar with firewall concepts, while at the same time simplifies … Read more

What is SR-IOV (Single Root I/O Virtualization) ?

SR-IOV is a technology, by Intel created to improve the networking performance of virtual machines. Interrupts First of all it is important to explain how interrupts are involved within packet processing. The process to remove and read packets from the wire, in both virtualized and non-virtualized systems is interrupt driven. When a packet is received … Read more

How to Enable Authentication and Create DB Users in MongoDB

By default authentication is not enabled within Mongo.  In this article we will show you how to enable authentication , create an account for global mongo administration and also create an account for database level authentication. Create UserAdmin First of all we go into the mongo shell and create our admin user. use admin db.createUser( … Read more

Linux Network Namespaces

The Linux Network Namespace (netns) is a feature within the 2.6.27+ Linux kernel. Normally a Linux process will run within a network namespace. By default this is inherited from its parent process. Network namespaces allow for the process to run within a different network namespace. This allows  for virtual instances of the Linux network stack … Read more

VMware VLAN Tagging Methods – EST, VST and VGT

Within VMware there are 3 methods around VLAN tagging. They are EST, VST and VGT. Below shows the differences between the 3, Type Physical (VNIC) Virtual (vSwitch) EST Access port Access port VST Trunk port Access port VGT Trunk port Trunk port EST Within EST (External Switching Tagging) VLAN tags are not handled[1]. The physical switchport … Read more

MySQL – How to Create/Assign a User to a Database

Below shows you the syntax required to assign a user (along with password) to a MySQL database. This is useful for assigning separate permissions across your databases rather then just assigning root access across the board. mysql> GRANT ALL ON <DATABASE>.* TO <USERNAME>@localhost IDENTIFIED BY ‘<PASSWORD>’;

How do I Export and Import a MySQL Database ?

There are times during migrations, database restores etc that you will need to export and import your MySQL database. Below shows you the commands required to achieved this. Note : This article is meant as a reference point rather then a full blown article. Export mysqldump -u root -p {database} > db.sql Import mysql -u … Read more

Configuring MongoDB within Django

INTRODUCTION reference to field types – INSTALL MONGO CONFIGURE DJANGO — install — pip install mongoengine — configure django — set settings to dummy mongoengine django – diff version yum install mongo new version install mongo etc into virtual env stop service

How do I install g++ via Yum ?

Issue How do you install g++ via Yum ? You may also be asking this due to receiving the following error when trying to compile from source, make[1]: g++: Command not found Solution To install g++ via yum run the command, yum install gcc-c++

How do I install node.js in Centos ?

Within this article we will show you how to compile node.js, version 0.10.25. Note : This article is meant as a quick, and short guide rather then full blown tutorial. Install Dependencies yum install bzip2 gcc gcc-c++ sqlite sqlite-devel Download wget Extract tar xvfz node-v0.10.25.tar.gz cd node-v0.10.25 Compile ./configure make make install  

UNIX – What is a sticky bit ?

History The sticky bit was first introduced in 1974 within the UNIX operating system. Its purpose was to instruct the operating system to place the process into swap once completed. Thus reducing the startup time of the process during further executions. However nowdays this usage is obsolete. Usage Instead, the sticky bit is now set … Read more

VIM – How do I make the width of a single TAB only 4 spaces wide ?

In this extremely short article we will provide you with the steps required to make the width of a single TAB only 4 spaces wide.This especially useful when using Visual Mode within VIM , in that you can indent large portions of text. Steps Within your ~/.vimrc file add the following lines. set shiftwidth=4   ” … Read more

Why does my scp file transfer fail but no error message is shown ?

Issue When using scp to copy a file the file fails to transfer, however there is no error message. Solution This issue can occur due echo commands within your .bashrc and how the scp program handles the output from these commands. This is a known bug within scp which can be viewed here. To resolve this … Read more

Window doesn’t show when using Cisco VPN Client 5.x / Windows 7

Recently I started having some issues with the Cisco VPN client window not coming to the foreground. After some digging I found the solution. Windows 7 Hold the Alt key, press Tab key until the VPN Client window is highlighted. Release Alt. Hold the Windows key and press the right arrow key once. This should … Read more

How to Fix Unreadable Directory Listings within Shell

You may find that when listing directories within the shell and when using a black background that the directory names aren’t clearly readable. To resolve this issue the following command and then log back in.  This command will issue a find and replace against the color setting (for directory listings) within the necessary configuration file. … Read more

MySQL – How to reset a forgotten Root password

I’m sure that we have all done it. Yep, that’s right you’ve forgotten the MySQL root password. Fear not my fellow conrade, with a few simple simple commands you will be back in control. Stop MySQL First of all stop MySQL. /etc/init.d/mysqld stop Connect to MySQL Next instruct MySQL to ignore the GRANT Tables. Then … Read more

Outlook 2010 – The ‘Delete Conversation’ Shortcut

After finding this amazing shortcut the other day I thought it worth sharing. To ignore a conversation (which moves them to the deleted items) use the shortcut <CTRL+DEL>. Further details can be found here

Configuring SSL within Apache

Within this article we will show you how to configure Apache to serve your content over a SSL based connection using a self signed certificate. Generate Certificate/Key First of all we generate a self signed certificate using openssl. This will create 2 files, a public certificate and a private key. mkdir -p /opt/ssl/crt/cd /opt/ssl/crt/openssl req … Read more

How do I tab multiple lines within VI ?

Within this article we will looking at the steps required to tab multiple lines within VI.This feature is great for ensuring readability, when editing indent based languages such as Python or just programming in general. Steps Press “<SHIFT> + v” to enter VISUAL LINE mode. Select the text you wish to indent but using either … Read more

What is a umask ?

The Umask (User Mask) is a UNIX function that is used to control the permission bitmask applied to newly created files and folders.The Umask value is subtracted from the default permission value. The resulting value is then assigned as the permission bitmask to the newly created file or folder. Note : The default permission values … Read more

How to define a passive FTP port range in IIS 7

Within this article we will describe the required steps for defining a specific passive FTP port range within IIS 7. First of all permit the necessary ports through your edge firewall. Typically you will only need to allow FTP (rather then the data channel ports as well) as most firewalls include a FTP inspection engine … Read more

How to clone a MySQL database

 Below shows your the steps needed to clone a MySQL database. mysqladmin create [new db name] -u [username] –password=[password] && \mysqldump -u [username] —password=[password] [old db name] | mysql -u [username] –password=[password] -h [host] [new db name]

Excel – Unable to open file

Issue Unable to open a file by just double-clicking on the file. But you can open the file if you go into Excel first. Solution You will need to turn off “Ignore other applications”. This can be found in “Tools / Options / General”.

How to display HTTP Headers via Tcpdump

Syntax To display the HTTP Headers using just tcpdump the following syntax can be used : [email protected] ~]#  tcpdump -vvvs 1024 -l -A host Example [[email protected] ~]# tcpdump -vvvs 1024 -l -A host tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 1024 bytes 19:51:57.742793 IP (tos 0x0, ttl 64, id 39410, offset … Read more

How do I install mplayer on Centos / RHEL ?

To install mplayer onto your Centos / RHEL distro you will need to : 1. Download and install the rpmforge repository. rpm -ivh  2. Add the following text to a new file : /etc/yum.repos.d/fc6.repo. cat > /etc/yum.repos.d/fc6.repo[PASTE THE FOLLOWING] [fc6-base] name=Fedora Core 6 mirrorlist=$basearch enabled=1 gpgcheck=0 [CTRL-C]  3. Install mplayer using yum. yum install mplayer

Useful Curl Examples

Curl is a tool to transfer data from or to a server, using one of the supported protocols (HTTP, HTTPS, FTP, FTPS, TFTP, DICT,  TELNET, LDAP or FILE) and is designed to work without user interaction. Below shows some useful examples: Total Retrieval Time [[email protected] ~]# curl -s -w “%{time_total}\n” -o /dev/null 0.196 Host … Read more

How can I test the bandwith using a Linux shell ?

The other day I was faced with the problem of determining the networking bandwidth of a Linux system via just the shell. After some googling and some head scratching I eventually came up with the following command. echo “scale=2; `curl  –progress-bar -w “%{speed_download}” -o` / 131072″ | bc | xargs -I {} echo … Read more

Installing Apache 2.2 from Source

Below details the basic steps required to compile Apache 2.2 upon a CentOS based distro. Update System yum install gcc Download Source cd /var/tmp/wget Unzip / Untar gunzip httpd-2.2.19.tar.gzmkdir httpdcd httpdtar -xvf ../httpd-2.2.19.tarcd httpd-2.2.19/ Compile ./configuremake Install make install Confirm Install [[email protected] httpd-2.2.19]# /usr/local/apache2/bin/apachectl -vServer version: Apache/2.2.19 (Unix)Server built: Jul 10 2011 17:59:10

CentOS timezone not updating

ISSUE When configuring the timezone within Centos the correct timezone is not propagated and the output of the command date does not represent the timezone previously configured. SOLUTION This can be caused by corrupted timezone files. To resolve the issue remove the soft-link, reinstall tzdata and then recreate the soft-link to the necessary timezone. [[email protected]Read more

How to Open / Extract RAR Files within Linux

To extract or open RAR files within Linux the unrar binary is used. Below provides the installation and basic operational syntax for the unrar program. 1. Installation 1.1 REDHAT yum install unrar 1.2 UBUNTU apt-get install unrar 2. Basic Syntax To extract a RAR file the following syntax is used: unrar e contents.rar 3. Example … Read more

Ubuntu – Ubiquity Error “The username you entered is invalid”

When Installing Ubuntu from a Live CD via the graphical installer ubiquity you may receive the following error :               The username you entered is invalid. Note that usernames               must start with a lower-case letter, which can be followed               by any combination of numbers and more lower-case letters. Solution This error can occur … Read more

How do I install a Package Manager within Cygwin ?

Though Cygwin provides the ability to update and install packages via the use of the Cygwin`s setup.exe command, the command line installer apt-cyg provides apt-get like syntax whilst still using Cygwin’s native package repository.   Below details the steps required to install the apt-cyg command line installer.   1. UPDATE CYGWIN First of all you … Read more

How to enable Indexing within Windows 2008

The Windows 2008 Indexing Options can be located from with the Control Panel. In a number of instances you may find that this is not available or not installed. To install the Windows 2008 Indexing Service follow these steps: Start Server Manager via the Start Menu | Administrative Tools. Click on Roles (left navigation pane). … Read more

Want to learn more about Operating Systems and Databases?

Here is our hand-picked selection of the best courses you can find online:
Linux Mastery course
Linux Administration Bootcamp
Learn Linux in 5 Days
Windows Server 2019 Administration course
Windows 10 Troubleshooting course
Complete VMware Administration course
VMware vSphere 7 – Install, Configure, Manage
Complete SQL Bootcamp
and our recommended certification practice exams:
AlphaPrep Practice Tests - Free Trial