≡ Menu

Chef Cookbook Directory Structure Explained with Examples

Chef LogoWhen you create a new Chef cookbook, it will automatically create certain directories and files. You’ll then be adding your own custom files on top these default files and directories.

For every chef cookbook you create, you’ll see 8 directories and 3 files under the top-level for that particular cookbook.

In this tutorial, we’ll explain the purpose of all the chef cookbook directories and files.
(more…)

Q: I have multiple yum repositories on my system. For example, centos, epel, docker, mongo, etc. When I execute yum update command, installed packages from all the repositories are updated. How can I exclude a specific repository during yum update?

A: During yum update, to exclude packages that belongs to a specific repository, use any one of the two methods explained in this tutorial.
(more…)

By default MySQL database will be created under /var/lib/mysql directory.

This might be Ok if you are running a small database that doesn’t take much space. But on production, for a larger database, you might not have enough space under root partition.

In that case, you may want to move your MySQL database from root partition to a different partition.

To change the MySQL directory, on a high level, you have to perform the following three steps:
(more…)

If you have PostgreSQL running in your environment, managing it from command-line might be bit difficult as you have to remember all the db commands and syntax.

If you are MySQL DBA, you might notice that there is a slight difference in the syntax for few of the commands in PostgreSQL. Also, some of the DBA concepts in PostgreSQL are slightly different than MySQL.

Using phpPgAdmin, you can pretty much do all PostgreSQL DBA activities from a web-based console. You don’t have to worry about remembering PostgreSQL DBA commands or syntax.
(more…)

RedisRedis is an in-memory key-value pair database.

Redis is extremely fast, as the operation happens in the memory. Redis also provides on-disk persistence and built-in replication.

In Redis, you can use these data structures: 1) String 2) Hash 3) List 4) Set 5) Sorted Set.

There is no integer or float data type in Redis. But, you can use string as integer, and there are few String commands that will allow you to manipulate string values are numbers.

In this tutorial, we’ll explain all the following Redis string (and number) commands with examples.
(more…)

12 Chef Knife Cookbook Command Examples

Chef LogoWhen you are using Chef to manage all your servers and network equipments, you should first create cookbooks and appropriate recipes.

On all your remote servers, you’ll use chef-client to execute the recipes from the cookbook.

In this tutorial, we’ll explain how to use knife command to create and manage your Chef cookbooks.
(more…)

How to Optimize MySQL Tables and Defragment to Recover Space

MySQL Application LogoIf your application is performing lot of deletes and updates on MySQL database, then there is a high possibility that your MySQL data files are fragmented.

This will result in lot of unused space, and also might affect performance.

So, it is highly recommended that you defrag your MySQL tables on an ongoing basis.

This tutorial explains how to optimize MySQL to defrag tables and reclaim unused space.
(more…)

15 Essential Amazon AWS EC2 CLI Command Examples

Amazon AWS LogoThe easy way to manage an Amazon AWS EC2 server is from the AWS management console GUI.

But, if your environment has multiple servers, then it gets bit tedious to manage it from the AWS GUI.

Also, if you are Linux sysadmin, you would prefer to manage your EC2 instances from the command line.

Pretty much anything that you can do from AWS console UI can be done from the command line.
(more…)