In the following steps we will explain how to install PhpMyAdmin on you Homestead.
Asuming that you have a Code directory on your vagrant box, as the default homestead configuration, we will install phpmyadmin on that directory.
- Go to your homestead directory, for example:
- Enter via ssh to you vagrant box
- Once you are connected via ssh, go to your Code directory, or your projects directory
- Download and install PhpMyAdmin
1curl -sS https://raw.githubusercontent.com/grrnikos/pma/master/pma.sh | sh
- Exit from your vagrant box
- Once you are out of the vagrant box, open your Vagrantfile on the Homestead directory and copy the IP address associated to the vagrant box, for example 127.0.0.1. Then add a new registry on your hosts file
1234sudo nano /etc/hosts# Append the following line127.0.0.1 phpmyadmin.app
- Open your Homestead.yml file and add a new site pointing to the phpmyadmin directory
12345nano ~/.homestead/Homestead.yaml# Under 'sites' add the following lines- map: phpmyadmin.appto: /home/vagrant/Code/phpmyadmin
- Reload your homestead
1vagrant reload --provision
And that’s it. You have phpmyadmin installed on your Homestead.