I installed it by running sudo apt-get install phpymyadmin
and then running
sudo ln -s /usr/share/phpmyadmin/ /usr/share/nginx/html
and sudo service nginx restart
but it's not working.
note: I didn't select any of apache2 or lighttpd options when installing.
As I couldn't comment on the Jyeon solution as my rep isn't high enough, I contribute with this answer; worked for me in Linux (openSUSE Leap) with Vagrant 1.8.1 and laravel/homestead (virtualbox, 0.4.0):
Step 1:
Go to phpMyAdmin website, download the latest version and unzip it into your project directory.
Step 2:
Add to your Homestead.yaml file the following lines:
Step 3:
Add to your hosts file the following line:
Step 4:
After start your vagrant environment and connects to machine via SSH, set your virtual host to work with phpMyAdmin with the command serve:
Thats it!
Go to http://phpmyadmin.app it should work, and you can login with your user and password homestead default. The great thing about this method is that you can set up your phpmyadmin so long as you keep it in your Homestead.yaml file and phpMyAdmin in your Code directory.
In my case accepted solution works ok except:
For an unknown reason serve command files creating configuration file as seen in:
Edit config:
and add 80 to Listen directive at line 2. Apply changes with:
Option 1:
This will install the latest version of PhpMyAdmin from a shell script I've written. You are welcome to check it out on Github.
Run the following command from your code/projects directory:
Option 2:
This will install PhpMyAdmin (not the latest version) from Ubuntu's repositories. Assuming that your projects live in
/home/vagrant/Code
:sudo apt-get install phpmyadmin
Do not select apache2 nor lighttpd when prompted. Just hit tab and enter.sudo ln -s /usr/share/phpmyadmin/ /home/vagrant/code/phpmyadmin
cd ~/Code && serve phpmyadmin.test /home/vagrant/code/phpmyadmin
Note: If you encounter issues creating the symbolic link on step 2, try the first option or see Lyndon Watkins' answer below.
Final steps:
Open the
/etc/hosts
file on your main machine and add:Go to http://phpmyadmin.test:8000
Step 1:
Go to the phpMyAdmin website, download the latest version and unzip it into your code directory
Step 2:
Open up
homestead.yaml
file and add these linesStep 3:
Open your hosts file and add this line:
Step 4:
You may need to run
vagrant provision
to load the new configuration if vagrant is already running.Thats it
Go to http://phpmyadmin.test:8000. It should work from there. Great thing about this method is that if you ever need to destroy your box, you won't ever have to set up phpMyAdmin again so long as you keep your homestead.yaml file and phpMyAdmin in your code directory.
===========
Important update from DaneSoul:
I tried this instruction on Homestead 5.3 and have met a problem "No input file specified" when trying open http://phpmyadmin.test.
And finnaly I found solution:
You need unpack phpmyadmin to
And write in
homestead.yaml
So almost all the same, but this
/public
directory in paths makes it working!Also, in my configuration I use http://phpmyadmin.test, not http://phpmyadmin.test:8000.
Update Note: Follow this article to change your domain extension.
A variation on Nikos Gr's answer that seemed a bit simpler (in that it doesn't require a new symbolic link for each project on your Homestead box) and worked for me.
sudo apt-get install phpmyadmin
. Don't select any of the options during install.On your host machine, add the following lines to your
Homestead.yaml
file:- map: phpmyadmin.dev to: /usr/share/phpmyadmin
On your host machine, add the following line to your
hosts
file:192.168.10.10 phpmyadmin.dev
...and Homestead's phpMyAdmin will be available at
phpmyadmin.dev
Install phpMyAdmin
SSH into Homestead vagrant box with vagrant ssh and type the following command:
When prompted to select the Web server, select
apache2
and press Enter, just to get pass it.When prompted to config database for phpmyadmin with dbconfig-common, select
Yes
and press Enter.When prompted for Password of the database's administrative user, enter
secret
and press Enter.When prompted for MySQL application password for phpmyadmin, enter
secret
and press Enter.When prompted for Password confirmation, enter
secret
again and press Enter.Then Create and config site for Nginx
Adding phpMyAdmin.app to your hosts file
Navigate to http://phpmyadmin.app:8000 and you should now see phpMyAdmin login page.
More info available here if you need it