I like using Vagrant to do this type of customization. You can either use the stock CentOS/Ubuntu/Debian box files (
.box) as initial base boxes or you can start with a stock ISO and build your own Vagrant box file using it.
.box files that most will typically want to use are here:
Now take one of the sample
$ cat Vagrantfile
Vagrant.configure("2") do |config|
config.vm.box = "centos/7"
or you can use one of mine via my github.com vagrantfiles repo. Now start it up, and SSH into it:
$ vagrant up
$ vagrant ssh
Once in, customize it. Once you're done exit the VM. Now you can package it:
$ vagrant package --base my-centos7
Once this is done, you'll get a .box file. This .box file can be referenced in other
Vagrantfiles for further reuse.
If you just want to download a
.box file you can use
vagrant to do this like so:
$ vagrant box add centos/7
vagrant box for additional usage details.