dsds33222 2015-10-08 16:42
浏览 25

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

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?

  • 写回答

1条回答

  • drasebt1835 2015-10-08 17:28
    关注

    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.
    评论

报告相同问题?

悬赏问题

  • ¥100 求数学坐标画圆以及直线的算法
  • ¥100 c语言,请帮蒟蒻写一个题的范例作参考
  • ¥15 名为“Product”的列已属于此 DataTable
  • ¥15 安卓adb backup备份应用数据失败
  • ¥15 eclipse运行项目时遇到的问题
  • ¥15 关于#c##的问题:最近需要用CAT工具Trados进行一些开发
  • ¥15 南大pa1 小游戏没有界面,并且报了如下错误,尝试过换显卡驱动,但是好像不行
  • ¥15 自己瞎改改,结果现在又运行不了了
  • ¥15 链式存储应该如何解决
  • ¥15 没有证书,nginx怎么反向代理到只能接受https的公网网站