##Сборка Vagrant Основана на Laravel4-Vagrant
В файле Vagrantfile меняем IP виртуальной машины и forwarded port если нужно светить ими во внешнюю сеть.
romach3_config.vm.network :private_network, ip: "192.168.200.101"
#romach3_config.vm.network :forwarded_port, guest: 80, host: 80, auto_correct: true
Далее делаем vagrant up
, заходим в Webmin, находим раздел Apache и создаем нужную конфигурацию.
Если в Webmin нет раздела Servers -> Apache Webserver, нажимаем Refresh Modules.
/var/www
виртуальной машины соотвествует ./www
хоста.
192.168.200.101:10000 User/Password: root account (vagrant/vagrant)
- User: root
- Password: (blank)
- DB Name: hantim
Accessible at 192.168.200.101/phpmyadmin using MySQL access credentials above.
XDebug is included in the build but disabled by default because of the effect it can have on performance.
To enable XDebug:
- Set the variable
$use_xdebug = "1"
at the beginning ofpuppet/manifests/phpbase.pp
- Then you will need to provision the box either with
vagrant up
or by running the commandvagrant provision
if the box is already up - Now you can connect to XDebug on port 9001
XDebug Tools
Note: All XDebug settings can be configured in the php.ini template at puppet/modules/php/templates/php.ini.erb
Vagrant is very well documented but here are a few common commands:
vagrant up
starts the virtual machine and provisions itvagrant suspend
will essentially put the machine to 'sleep' withvagrant resume
waking it back upvagrant halt
attempts a graceful shutdown of the machine and will need to be brought back withvagrant up
vagrant ssh
gives you shell access to the virtual machine
- OS - Ubuntu 12.04
- Apache - 2.4.6
- PHP - 5.5.4
- MySQL - 5.5.32
- PostgreSQL - 9.1
- Beanstalkd - 1.4.6
- Redis - 2.2.12
- Memcached - 1.4.13