Runs nginx, php-fpm and mysql (mariadb).
- Vagrant
- VirtualBox
- Ansible (for all non-windows environments)
-
Install
Vagrant
,VirtualBox
andAnsible
-
Rename
Vagrantfile.default
file toVagrantfile
-
Update
Vagrantfile
configs
Go to ./Vagrantfile in the root and change the following settings:
config.vm.provider :virtualbox do |v|
v.name = "GIVE A NAME TO YOUR MACHINE"
v.customize [
"modifyvm", :id,
"--name", "GIVE A NAME TO YOUR MACHINE",
"--memory", 2048,
"--natdnshostresolver1", "on",
"--cpus", 4,
]
end
Replace GIVE A NAME TO YOUR MACHINE
with a name of your project.
Other configs (like --memory
or --cpus
) can be left as is or updated
if needed.
-
If necessary, change port in the following line of
Vagrantfile
:config.vm.network :private_network, ip: "192.168.33.99"
-
Copy
ansible/inventories/dev.default
file toansible/inventories/dev
.If you've changed port in the step above, change it here as well.
-
Run
vagrant up
-
Download & import database
`mysql db < dump.sql`
- Configure your
hosts
file to match the project name and the ip
`192.168.33.99 sitename.local`
username: root
password: vagrant
vagrant ssh
It will log you in as "vagrant" user. If you want to switch to root user, do the following:
vagrant ssh
su
Or just connect through any available ssh terminal:
ssh root@192.168.33.99
Database name: db
MySQL user:
username: root
password: (empty)
Go to http://192.168.33.99/logs
- Xdebug
- Redis
- Solr
- Selenium
- Phantomjs
- XHprof
- Add email stub
- Review performance
- PhpMyAdmin