如何在Laravel Homestead盒子上设置phpMyAdmin? [英] How do I set up phpMyAdmin on a Laravel Homestead box?
问题描述
我通过运行sudo apt-get install phpymyadmin
然后运行
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上 进行检查.
-
从您的code/projects目录运行以下命令:
Run the following command from your code/projects directory:
curl -sS https://raw.githubusercontent.com/grrnikos/pma/master/pma.sh | sh
选项2:
这将从Ubuntu的存储库中安装PhpMyAdmin(不是最新版本).假设您的项目位于/home/vagrant/Code
中:
-
sudo apt-get install phpmyadmin
出现提示时,请不要选择apache2或lighttpd.只需点击标签并输入.
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
注意:如果在步骤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
转到 http://phpmyadmin.test:8000
这篇关于如何在Laravel Homestead盒子上设置phpMyAdmin?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!