“启动”时流浪灯箱认证失败

I'm new to vagrant and followed along with the getting started tutorial and was able to initialize and run the precise32 box and serve a "hello world" index.html file from http://127.0.0.1:8080.

However, I want to run a PHP box so I grabbed the most popular LAMP box (scotch/box) off the vagrant cloud.

My problem is that when I run the setup command for the LAMP box:

vagrant init scotch/box; vagrant up --provider virtualbox

The box does not appear to boot up and instead I receive the following message:

Authentication failure. Retrying...

I have a brand new Virtual Box install (5.0.6) am on OSX (Yosemite) and I'm not trying to do anything out of the ordinary, just run a PHP machine. Any ideas where I'm going wrong?

duankuaiwang2706
duankuaiwang2706 更正:GUI输出一堆东西然后挂起“等待网络配置...等待多达60秒的网络配置......”真的不确定那是什么。
接近 5 年之前 回复
douchen9855
douchen9855 谢谢你,但我立即做了(经过一些研究),所有的GUI都显示我是登录提示。为什么我需要打开一个单独的gui才能输入凭据而不是仅仅在原始终端窗口输入凭据?对我来说似乎很奇怪。
接近 5 年之前 回复
duanbo5230
duanbo5230 打开GUI(在Vagrant文​​件中)。然后你可以看到框中发生了什么。config.vm.provider“virtualbox”do|v|v.gui=trueenddocs.vagrantup.com/v2/virtualbox/configuration.html
接近 5 年之前 回复

1个回答



我不知道为什么几个最受欢迎的盒子对我不起作用......但对于遇到这个问题的其他人来说, 我刚尝试了几个盒子,直到找到一个真正起作用的盒子(至少我的配置)。 对我有用的方框是: smallhadroncollider / centos-6.5-lamp </ p>

以下是使用vagrant创建可用PHP环境的完整步骤:</ p>


  1. 安装VirtualBox </ li> \ n
  2. 安装Vagrant </ li>
  3. 添加一个新的流浪盒: vagrant box add smallhadroncollider / centos-6.5-lamp </ code> </ li>
  4. 创建新的空 目录并在终端内导航到它......一旦那里,初始化你的新流浪盒: vagrant init smallhadroncollider / centos-6.5-lamp </ code> </ li>
  5. 编辑自动生成的流浪汉 在您刚刚运行 vagrant init </ code>命令的目录中创建的文件,并在“forwarded_port”设置中注释,以允许主机端口8080(或您选择的任何端口)路由到虚拟服务器端口 80。</ li>
  6. 启动新的流浪者盒:vagrant up --provider virtualbox </ li>
  7. 创建 index.php </ code>文件 与您的vagrant文​​件位于同一目录中。 从 http://127.0.0.1:8080 运行它,它应该处理您的PHP代码</ li>
  8. 现在,通过使用 vagrant ssh </ code> </ li>启动调试消息启用调试消息</ li>
  9. 通过在您的vagrant机器上编辑php.ini来启用调试输出(/ etc / php5 / apache2 / php.ini) - 如有必要,使用 index.php </ code>文件中的 phpinfo()</ code>函数找到存储php.ini的位置</ li> \ n
  10. 当仍在流浪汉机器上时,重启Apache sudo /etc/init.d/apache2 restart </ code>。 忽略“无法可靠地确定...警告消息。”</ li>
  11. 退出</ code>流浪盒以返回本地计算机。 你已经完成了,你的PHP代码现在应该运行调试消息。 </ li>
    </ ol>
    </ div>

展开原文

原文

I have no idea why several of the most popular boxes would not work for me... but for anyone else who comes across this, I just tried several boxes until I found one that actually worked as advertised (at least with my configuration). The box that worked for me was: smallhadroncollider/centos-6.5-lamp

Here are the full steps I took to create a working PHP environment using vagrant:

  1. Install VirtualBox
  2. Install Vagrant
  3. Add a new vagrant box: vagrant box add smallhadroncollider/centos-6.5-lamp
  4. Create new empty directory and navigate to it within terminal... once there, initialize your new vagrant box: vagrant init smallhadroncollider/centos-6.5-lamp
  5. Edit the auto-generated vagrant file which was created in the directory where you just ran the vagrant init command and comment-in the "forwarded_port" setting to allow host machine port 8080 (or whatever port you choose) to route to virtual server port 80.
  6. Start-up your new vagrant box: vagrant up --provider virtualbox
  7. Create index.php file in the same directory as your vagrant file. Run it from http://127.0.0.1:8080 and it should process your PHP code
  8. Now, enable debugging messages by SSHing into your new vagrant box with vagrant ssh
  9. Enable debug output by editing php.ini on your vagrant machine (/etc/php5/apache2/php.ini) - if necessary, find where php.ini is stored using the phpinfo() function in your index.php file
  10. While still on vagrant machine, restart Apache sudo /etc/init.d/apache2 restart. Ignore the "could not reliably determine... warning message."
  11. exit vagrant box to return to your local machine. You're done and your PHP code should now be running with debug messages.

dsiy62758
dsiy62758 另一个有趣的来源是puphpet.com,你可以配置版本和软件安装,是的它确实有效
接近 5 年之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐