Installing Zimbra on Vagrant CentOS 7
Install Zimbra on a CentOS7 VM
Vagrantfile contents should be like below:
# -*- mode: ruby -*-
# vi: set ft=ruby :# All Vagrant configuration is done below. The “2” in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don’t change it unless you know what
# you’re doing.
Vagrant.configure(“2”) do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
# https://docs.vagrantup.com.# Every Vagrant development environment requires a box. You can search for
# boxes at https://vagrantcloud.com/search.
config.vm.box = “centos/7”config.vm.network “private_network”, ip: “192.168.10.34”
config.vm.hostname = “zimbra.nils.local”
#config.vm.synced_folder “./zimbra_doc”, “/var/www”, :mount_options => [“dmode=777”, “fmode=666”]config.ssh.insert_key = false
config.vm.boot_timeout = 800
config.ssh.private_key_path = [“keys/.ssh/vagrant_rsa”, “~/.vagrant.d/insecure_private_key”]
config.ssh.forward_agent = true
config.vm.provision “file”, source: “keys/.ssh/vagrant_rsa.pub”, destination: “~/.ssh/authorized_keys”
Download Zimbra version compatible to your CentOS version:
Copy it from your host to CentOS.
senoritadev:VagrantVM senoritadev$ vagrant scp /Users/senoritadev/Downloads/zcs-8.8.15_GA_3869.UBUNTU18_64.20190917004220.tgz .
Key generation is required (navigate to the folder path where your Vagrantfile exists):
➜ mkdir -p keys/.ssh➜ ssh-keygen -t rsa -b 4096 -C “your e-mail address here”
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/senoritadev/.ssh/id_rsa): /Users/senoritadev/VagrantVM/zimbraCentOS/keys/.ssh/vagrant_rsa
Run “vagrant up” command to start your VM.
Connect to CentOS terminal with “vagrant ssh” command.
You should follow steps described in https://www.itzgeek.com/how-tos/linux/centos-how-tos/how-to-install-open-source-zimbra-mail-server-8-8-on-centos-7-rhel-7-ubuntu-16-04.html for installing Zimbra on CentOS (Mail Server Setup and Create A and Mx Record steps are not required yet, you can skip).
After installation is done, to reach your Zimbra from your host, you should make some additions to your /etc/hosts file written as below: