Skip to content
This repository has been archived by the owner on May 26, 2021. It is now read-only.
/ vagrant-centos7 Public archive

Vagrant boxes built from CentOS 7.5.1804 for VirtualBox, VMware, and Parallels.

Notifications You must be signed in to change notification settings

skyzyx/vagrant-centos7

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CentOS 7.5 Vagrant/Docker Boxes

IMPORTANT: CentOS 7.5 is the final version that I will be building of this AMI. Moving forward, my VM-building efforts will be going primarily into Amazon Linux 2.

Building Vagrant images based on CentOS 7.5 (minimal install). All instructions were tested against macOS 10.13 “High Sierra”, VMware Fusion 10, VirtualBox 5.1, and Parallels Desktop 11.

If your intention is only to use one of these CentOS 7.5 images, you can open your Vagrantfile and set:

config.vm.box = "skyzyx/centos7"

Why CentOS?

CentOS is a very good, very stable, very reliable server OS. It is essentially an all-open-source version of Red Hat Enterprise Linux.

The flip side is that sometimes we can end up with an older set of packages than we might prefer, which is why I maintain this particular Vagrant box.

By leveraging centos7-repos, we can maintain modern software — securely — on a more conservative OS.

What do you install on top of the base image?

These images are based on a minimal install of CentOS 7.5. On top of that base installation, we install the following:

  • We write the image's build time to /etc/vagrant_box_build_time.
  • Disable SELinux.
  • Configure ntp to speak to time.nist.gov, and set the timezone to UTC.
  • Make SSH more secure by forcing Protocol 2 and disabling root login.
  • Disable all default yum updates.
  • Remove ancient PHP and Maria DB libs.
  • Add /usr/local/bin to the $PATH by default.
  • Enable all yum repositories from centos7-repos.
  • Install the Development Tools yum group.
  • Install modern cURL, which can speak HTTP/2, TLS 1.1, and TLS 1.2.
  • Install updates to OpenSSL, strace, htop, nano, vi, and a number of other core packages.
  • Install modern VMware Tools and/or VirtualBox tools.
  • Allow user Vagrant to use sudo without entering a password.

Prerequisites

Updating your Plug-Ins

This is simply a good thing to do from time to time.

vagrant plugin update

Installing Packer

I'm going to assume that you have already:

  1. Installed Vagrant and its dependencies.
  2. Installed (and paid for) the virtualization software of your choice.

You have two choices for installing Packer.

  1. If you already have the Homebrew package manager installed, you can simply do:

    brew install packer
  2. Otherwise, you can manually install it from https://www.packer.io/downloads.html.

See “Install Packer” for more information.

Building Vagrant Boxes

Build everything

This template has built-in support for VirtualBox, VMware, and Parallels Desktop. You can build everything at the same time (assuming you have the relevant prerequisites installed) with:

packer build template.json

Build only one

If you only want to build one particular Vagrant box, you can use the --only flag.

# VMware
packer build --only=vmware-iso template.json

# VirtualBox
packer build --only=virtualbox-iso template.json

# Parallels
packer build --only=parallels-iso template.json