-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathVagrantfile
More file actions
73 lines (65 loc) · 2.17 KB
/
Copy pathVagrantfile
File metadata and controls
73 lines (65 loc) · 2.17 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/xenial64"
config.vm.provider "virtualbox" do |vb|
vb.memory = 4096
vb.cpus = 4
vb.customize ["modifyvm", :id, "--ioapic", "on"]
end
# Network
config.vm.network "forwarded_port", guest: 3000, host: 3000
config.vm.network "forwarded_port", guest: 3306, host: 3306
config.vm.network "private_network", ip: "192.168.10.100"
# config.vm.network "private_network", type: "dhcp"
# Shared Folders
config.vm.synced_folder ".", "/home/vagrant/projects", type: "nfs"
config.vm.provision "shell", inline: <<-SHELL
# update
sudo apt-get update
# upgrade
sudo apt-get upgrade
# install git
sudo apt-get install -y git
# install extra libraries
sudo apt-get install -y g++
sudo apt-get install curl python-software-properties
apt-get install software-properties-common
apt-get update
# install node js 10.x.x stable version
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
apt-get install -y nodejs
# install gulp-cli globally
npm install gulp-cli -g
# Apache
apt-get install -y apache2
# Enable Apache Mods
a2enmod rewrite
#Add Onrej PPA Repo
apt-add-repository ppa:ondrej/php
apt-get update
# Install PHP
apt-get install -y php7.2
# PHP Apache Mod
apt-get install -y libapache2-mod-php7.2
# Restart Apache
service apache2 restart
# PHP Mods
apt-get install -y php7.2-common
apt-get install -y php7.2-mcrypt
apt-get install -y php7.2-zip
# Set MySQL Pass
debconf-set-selections <<< 'mysql-server mysql-server/root_password password root'
debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password root'
# Install MySQL
apt-get install -y mysql-server
# PHP-MYSQL lib
apt-get install -y php7.2-mysql
# Restart Apache
sudo service apache2 restart
SHELL
end