Collection of Vagrant files and Chef cookbooks to install virtual machines for different purposes:
- Zend Server Community Edition with PHP 5.3 (Vagrantfile.zend-server-ce-php53)
- Zend Server Community Edition with PHP 5.4 (Vagrantfile.zend-server-ce-php54)
There is no default Vagrantfile. It has to be created and if required to be configured.
-
Create a Vagrantfile by copy
cp Vagrantfile.zend-server-ce-php54 Vagrantfile
-
Alter
Vagrantfile
and change hostname and/or IP if needed:config.vm.host_name = "myhostname" config.vm.network :hostonly, "192.168.100.15"
-
Start Vagrant and install everything
vagrant up
After this you can lean back and when it’s finished you can connect to your vagrant machine via vagrant ssh
or open the browser and type in the IP.
-
Create a Vagrantfile by copy
cp Vagrantfile.zend-server-ce-php53 Vagrantfile
After this step you can continue with step 2 from above.
http://192.168.100.15:10081 or https://192.168.100.15:10082
The following step is optional but creates more comfort for the developer by adding the vagrant machine’s ip address to the ssh config you’re able to easily connect to it via ssh myhostname
:
# ~/.ssh/config
#
# Example (see Vagrantfile):
#
# config.vm.host_name = "myhostname"
# config.vm.network :hostonly, "192.168.100.15"
Host myhostname
HostName 192.168.100.15
Port 22
User vagrant
UserKnownHostsFile /dev/null
StrictHostKeyChecking no
PasswordAuthentication no
IdentityFile ~/.vagrant.d/insecure_private_key
IdentitiesOnly yes
For even more comfort during development you can alter your computer’s hostfile to know which ip belongs to your myhostname
you just have to add the ip and hostname to it:
# /etc/hosts
#
# Example (see Vagrantfile):
#
# config.vm.host_name = "myhostname"
# config.vm.network :hostonly, "192.168.100.15"
192.168.100.15 myhostname
After that you can access the Zend Server GUI via HTTP with this simple URL: http://myhostname:10081 or https://myhostname:10082