29/06/2016 - VAGRANT
We have been investing plenty of personal time and energy for many years to share our knowledge with you all. However, we now need your help to keep this blog running. All you have to do is just click one of the adverts on the site, otherwise it will sadly be taken down due to hosting etc. costs. Thank you.
These are some useful vagrant related notes from me.
We all know that vagrant boot up is a bit slow, especially provisioning so you should do your best to increase the performance inside and outside. You can play with RAM and CPU configs in Vagrantfile. On top of that you can use vagrant-cachier tool.
To read what commands below do in more detail, visit CLI page.
vagrant up- Installs a box or starts existing one.
vagrant halt- Stops running session.
vagrant reload- Reloads box.
vagrant reload --provision- Reloads box with running bootstrap scripts.
vagrant global-status- List all vagrant machines in the system and their current statuses.
vagrant global-status --prune- Removes all listed but non-existent vagrant machines from the system. (If you deleted a vagrant project folder manually, you won't be able to kill registered vagrant boxes/machines. This will cause you problems when trying to add a new box in the future. To get rid of this problem, use this command.)
vagrant destroy [name/id]- Removes vagrant machines from the system.
vagrant box add ubuntu/trusty64command, it will add the box to filesystem so you don't need to run it again in future for the same box. For the new projects, just place Vagrantfile in the project folder and run
vagrant init ubuntu/trusty64command.
wget -qO- 127.0.0.1.
> /dev/null 2>&1from the line to see what actually happens with the command.
rootthen you won't be able see all the databases when in GUI.
Where phpMyAdmin GUI settings are.
Where phpMyAdmin GUI settings above are originated from.
If you get errors like below when running any vagrant commands, run
$ sudo /usr/share/debconf/fix_db.pl command in vagrant box.
==> default: error: Cannot find a question for phpmyadmin/dbconfig-install
==> default: error: Cannot find a question for phpmyadmin/app-password-confirm
==> default: error: Cannot find a question for phpmyadmin/mysql/admin-pass
==> default: error: Cannot find a question for phpmyadmin/mysql/app-pass
$ sudo /usr/share/debconf/fix_db.pl
debconf: template "phpmyadmin/app-password-confirm" claims to be used by nonexistant question "phpmyadmin/app-password-confirm"; removing that.
debconf: template "phpmyadmin/mysql/admin-user" claims to be used by nonexistant question "phpmyadmin/mysql/admin-user"; removing that.
debconf: template "phpmyadmin/mysql/app-pass" claims to be used by nonexistant question "phpmyadmin/mysql/app-pass"; removing that.
debconf: template "phpmyadmin/dbconfig-install" claims to be used by nonexistant question "phpmyadmin/dbconfig-install"; removing that.
debconf: template "phpmyadmin/mysql/admin-pass" claims to be used by nonexistant question "phpmyadmin/mysql/admin-pass"; removing that.