如何在Laravel Homestead盒子上设置phpMyAdmin? [英] How do I set up phpMyAdmin on a Laravel Homestead box?

查看:68
本文介绍了如何在Laravel Homestead盒子上设置phpMyAdmin?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我通过运行sudo apt-get install phpymyadmin然后运行

sudo ln -s /usr/share/phpmyadmin/ /usr/share/nginx/htmlsudo service nginx restart

但是它不起作用.

注意:安装时我没有选择任何apache2或lighttpd选项.

Note: I didn't select any of the apache2 or lighttpd options when installing.

推荐答案

选项1:

这将从我编写的Shell脚本中安装最新版本的PhpMyAdmin.欢迎您在Github上 进行检查.

  1. 从您的code/projects目录运行以下命令:

  1. 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中:

  1. sudo apt-get install phpmyadmin出现提示时,请不要选择apache2或lighttpd.只需点击标签并输入.

  1. 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.

  1. 在主机上打开/etc/hosts文件并添加:

127.0.0.1  phpmyadmin.test

  • 转到 http://phpmyadmin.test:8000

    这篇关于如何在Laravel Homestead盒子上设置phpMyAdmin?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

  • 查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆