Code Monkey home page Code Monkey logo

vagrant-centos7's Introduction

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.