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

报告相同问题?

悬赏问题

  • ¥15 如何用stata画出文献中常见的安慰剂检验图
  • ¥15 c语言链表结构体数据插入
  • ¥40 使用MATLAB解答线性代数问题
  • ¥15 COCOS的问题COCOS的问题
  • ¥15 FPGA-SRIO初始化失败
  • ¥15 MapReduce实现倒排索引失败
  • ¥15 ZABBIX6.0L连接数据库报错,如何解决?(操作系统-centos)
  • ¥15 找一位技术过硬的游戏pj程序员
  • ¥15 matlab生成电测深三层曲线模型代码
  • ¥50 随机森林与房贷信用风险模型