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

报告相同问题?

悬赏问题

  • ¥50 如何增强飞上天的树莓派的热点信号强度,以使得笔记本可以在地面实现远程桌面连接
  • ¥15 MCNP里如何定义多个源?
  • ¥20 双层网络上信息-疾病传播
  • ¥50 paddlepaddle pinn
  • ¥20 idea运行测试代码报错问题
  • ¥15 网络监控:网络故障告警通知
  • ¥15 django项目运行报编码错误
  • ¥15 请问这个是什么意思?
  • ¥15 STM32驱动继电器
  • ¥15 Windows server update services