Category: Centos 7

Installing Katello

What is Katello?

The official definition according to the Katello website:

“Katello brings the full power of content management alongside the provisioning and configuration capabilities of Foreman.

In short Katello is a plugin for Foreman. The two have been combined and are shipped as one by the developers. It adds the ability for provisioning and deployment with Puppet from Foreman and merges the control and management of local yum and puppet repositories with Katello.

Installing Katello

I have found installing Katello a bit tricky as the documentation is lacking at time. Katello offers two ways of installing the first by adding the appropriate repositories and initializing the installation. To be honest I have never been able to install Katello this way. Which is probably why they came up with the second method utilizing  Katello Deploy. Now don’t be fooled as this install method has a trick up it’s sleeve also.

Katello deploy instructions are quite simple. Checkout the code from git and run the install command. But here is where it gets tricky as checking out the master branch will probably give you the same issues I faced when trying to install. You instead need to checkout the KATELLO-2.4 branch. This branch contain the official release version of Katello 2.4.

So following modifying the official instructions from the repository:

  1. ssh to target machine as root
  2. Install git and ruby   yum install -y git ruby
  3. Clone the repository  git clone
  4. Enter the repository  cd katello-deploy
  5. Checkout KATELLO-2.4  git checkout KATELLO-2.4
  6. Install Katello  ./setup.rb --version 2.4

Once installation is done you will be presented with login information for you Katello install.

Helpful Links

How to install the EPEL Repo on a CentOS 7 and RHEL 7.x

What is the EPEL Repo?

EPEL stands for Extra Packages for Enterprise Linux. This is a package repo based on Fedora and it is managed and maintained by a Fedora Special Interest Group. The EPEL Repo contains many packages that are not shipped in the official CentOS or RHEL releases. They are very much compatible but are not officially supported.

How do I install the EPEL Repo on CentOS 7 or Red Hat Enterprise Linux 7?

Assuming you are logged in as root or have sudo access, then you only need one command:

Example output:

How do I verify that the EPEL Repo installed correctly?

You can view the installed repos by using the yum command:

Example output:

As you can see in line number 10 the EPEL repo is now installed and available on your system.



How to create a Centos 7.0 Vagrant Base Box

This tutorial is aimed at allowing you to create a Vagrant base box which contains Centos 7.0. Vagrant allows you to create and share virtual machines with anybody. There are two ways of using Vagrant boxes, either you create them or you can import one. You can import one from the internet or any other medium. In this tutorial I will show you how to create your own Centos 7.0 Vagrant box. I usually create my own boxes as it allows me to only install the software that I need or want.

Tools you will need:

* VirtualBox –
* Centos 7.0 –

Let’s begin

1. If you haven’t done so already, download and install VirtualBox (

2. Download Centos 7.0 ( For the purpose of this tutorial I will be using the NetInstall ISO, but you may use any other ISO. I selected the NetInstall because of it’s small file size.

3. Create a new VM with VirtualBox. I have named mine centos7-vagrant.

VirtualBox Name

You may setup this box any way you want. As far as settings are concerned, I have selected the following settings:
– Memory: 2GB
– Hard Disk: 20GB fixed size

Memory Size
Memory Size
File Type
Hard drive file type
Fixed Size
Storage on physical hard drive
Drive Size
File location and size

4. Once your VM has been created go ahead and boot it up. It will ask you for a start-up disk. In my case I downloaded the NetInstall ISO. So I browsed and select CentOS-7.0-1406-x86_64-NetInstall.iso

Select Startup Disk
Select Startup Disk

5. Install Centos with any parameters you want. I selected a minimal install since I just want the basics and any special package that I need will be installed later.

Installation Summary
Installation Summary

6. Set the root password as “vagrant”.

Root Password
Root Password

7. Create the vagrant user. Set the username and password to “vagrant”

Create User
Create User

8. Once installation is finished and the VM restarts, login as root.

9. Now would be a good time to install the VirtualBox Guest Additions. NOTE: This is an optional step.

10. Now we need to install packages that are essential for Vagrant to operate within the VM.

11. Let’s enable some services at startup time. We need ntpd so that it sets the time up correctly every time you boot up the Vagrant box, and of course sshd in order to SSH in.

12. Disable iptables as it really is not needed for a Vagrant box. It would just get in the way.

13. Set SELinux to permissive mode.

14. Comment out requiretty in /etc/sudoers. This will allow Vagrant to apply changes during startup.

15. Add the vagrant user to /etc/sudoers file.

16. Create /etc/sysconfig/network-scripts/ifcfg-eth0 and add the following:

17. We must now add a public key for the vagrant user. You can use the default public key or create a custom one. You may find more information on how to create a custom vagrant public key in the following tutorial “Using custom Vagrant SSH public/private keys“. For now we are going to use the readily available vagrant public key.

Create .ssh folder on the home directory:

Copy publick key:

curl >> /home/vagrant/.ssh/authorized_keys

Set the correct permissions:

Make sure everything is owned by the correct use:

18. Turn off the VM

19. To create your Vagrant Box you will need to package the VM you just created. The following command will package the VM into your home directory. You are free to change this directory by modifying the –output paramenter

The –output would be the destination of your Vagrant Box file, and –base is the name or UUID of the VM that was created using VirtualBox.

20. Create the Vagrantfile

21. Start the Vagrant VM


If all the steps where followed correctly then your vagrant box is up and running. To login to the machine just do