forked from vicb/hhvm-vagrant
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVagrantfile
51 lines (41 loc) · 1.86 KB
/
Vagrantfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "ericmann/trusty64"
config.vm.network :forwarded_port, guest: 80, host: 8080
config.vm.network :forwarded_port, guest: 8000, host: 8100
config.vm.network :private_network, ip: "192.168.66.66"
config.vm.provider :virtualbox do |vb|
vb.name = "HHVM"
vb.customize ["modifyvm", :id, "--memory", "2048"]
vb.customize ["modifyvm", :id, "--ostype", "Ubuntu_64"]
end
config.vm.provider "hyperv" do |hv, override|
override.ssh.username = "vagrant"
end
config.vm.provision "shell", inline: <<-shell
apt-get update
apt-get install python-software-properties -y --force-yes
add-apt-repository ppa:nginx/stable
# installs add-apt-repository
apt-get install software-properties-common
apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0x5a16e7281be7a449
add-apt-repository "deb http://dl.hhvm.com/ubuntu $(lsb_release -sc) main"
apt-get update
apt-get install nginx -y --force-yes
apt-get install hhvm -y --force-yes
apt-get install screen vim -y --force-yes
#debconf-set-selections <<< 'mysql-server-5.5 mysql-server/root_password password pa$$'
#debconf-set-selections <<< 'mysql-server-5.5 mysql-server/root_password_again password pa$$'
#apt-get install mysql-server -y --force-yes
sudo chown vagrant /etc/hhvm
sudo cp /vagrant/conf/config.hdf /etc/hhvm/my-config.hdf
sudo cp /vagrant/conf/php.ini /etc/hhvm/my-php.ini
sudo rm /etc/nginx/sites-enabled/default
sudo cp /vagrant/conf/nginx-fastcgi /etc/nginx/sites-available/nginx-fastcgi
sudo ln -s /etc/nginx/sites-available/nginx-fastcgi /etc/nginx/sites-enabled/nginx-fastcgi
sudo service nginx restart
hhvm -m daemon -c /etc/hhvm/my-php.ini -v Eval.EnableXHP=1
shell
end