Skip to content
This repository was archived by the owner on Feb 8, 2024. It is now read-only.

2.1. Up And Running

Shin Okada edited this page Dec 20, 2015 · 1 revision

PHP7 Vagrant Box Image

git clone https://github.com/rlerdorf/php7dev.git
cd php7dev
vagrant up
// select Ethernet or Wi-Fi for network bridge
...
1) en4: DAD
2) en0: Ethernet
3) en1: Wi-Fi (AirPort)
4) en2: Thunderbolt 1
5) p2p0
6) bridge0
==> default: When choosing an interface, it is usually the one that is
==> default: being used to connect to the internet.
    default: Which interface should the network bridge to? 3
...

// edit /etc/hosts
vim /etc/hosts
// add
192.168.7.7 php7dev

Browse 192.168.7.7 or http://php7dev.

// In the browser php info, check the document root
$_SERVER['DOCUMENT_ROOT']    /var/www/default

// open another tab
vagrant ssh
php -v
cd /var/www/default
mkdir src
// create a symbolic link
// local create a link between php7dev(which is the host vagrant dir)/src and /var/www/default
// this will create a src dir in php7dev dir
sudo ln -s /vagrant/src /var/www/default

In the host, create a index.php

// php7dev/src/index.php
<?= 'It works';

Check it in the vagrant

cd /var/www/default/src
cat index.php

Browse http://php7.dev/src

2. PHP7.md


  1. Up And Running

Clone this wiki locally