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

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

问题描述

我通过运行 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/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. 从您的代码/项目目录运行以下命令:

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

  1. sudo apt-get install phpmyadmin 提示时不要不要选择 apache2 或 lighttpd.只需按 Tab 键并输入.

  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 &&服务 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天全站免登陆