如何在 Laravel Homestead 盒子上设置 phpMyAdmin? [英] How do I set up phpMyAdmin on a Laravel Homestead box?
问题描述
我通过运行 sudo apt-get install phpymyadmin
然后运行
I installed it by running sudo apt-get install phpymyadmin
and then running
sudo ln -s/usr/share/phpmyadmin//usr/share/nginx/html
和 sudo service nginx restart
但它不起作用.
注意:安装时我没有选择任何 apache2 或 lighttpd 选项.
Note: I didn't select any of the apache2 or lighttpd options when installing.
推荐答案
选项 1:
这将从我编写的 shell 脚本安装最新版本的 PhpMyAdmin.欢迎您在 Github 上查看.
从您的代码/项目目录运行以下命令:
Run the following command from your code/projects directory:
curl -sS https://raw.githubusercontent.com/grrnikos/pma/master/pma.sh | bash
选项 2:
这将从 Ubuntu 的存储库安装 PhpMyAdmin(不是最新版本).假设您的项目位于 /home/vagrant/Code
:
sudo apt-get install phpmyadmin
提示时不要不要选择 apache2 或 lighttpd.只需按 Tab 键并输入.
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 &&服务 phpmyadmin.test/home/vagrant/code/phpmyadmin
注意:如果您在第 2 步创建符号链接时遇到问题,请尝试第一个选项或查看下面 Lyndon Watkins 的回答.
Note: If you encounter issues creating the symbolic link on step 2, try the first option or see Lyndon Watkins' answer below.
在你的主机上打开
/etc/hosts
文件并添加:
127.0.0.1 phpmyadmin.test
这篇关于如何在 Laravel Homestead 盒子上设置 phpMyAdmin?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!