Académique Documents
Professionnel Documents
Culture Documents
https://www.taniarascia.com/what-are-vagrant-and-virtualbox-and-how-do-i-use-them/
- install Ubuntu vagrant box inside the folder in C:\Users\Tiberiu\VirtualBox VMs (vagrant box add
ubuntu/trusty64) (just once)
To start the machine go to the folder where the vagrantfile lives (C:\Users\Tiberiu\VirtualBox VMs)
and use the last 2 commands (up and ssh).
- to see machine in browser, you need to give the Vagrant box a static IP address: create a private
network, which allows host-only access to the machine (edit Vagrantfile and uncomment
(https://www.taniarascia.com/how-to-install-apache-php-7-1-and-mysql-on-ubuntu-with-vagrant/)
APACHE:
This is done to fix “server's fully qualified domain name” error. Go to end of file and paste
“ServerName localhost”, then save and close file(ctrl-x, yes);
PHP:
- php -v
MYSQL:
- sudo apt-get install mysql-server php7.1-mysql (leave root password blank, it’s easier)
- forward the default MySQL port 3306 on your vm (add this line to vagrantfile):
FLUSH PRIVILEGES;
- open workbench and create a new connection(standard tcp/ip over ssh), the info below comes from
vagrant ssh-config command:
Username: user
Password: password
In the Vagrant root directory(C:\Users\Tiberiu\VirtualBox VMs) create a www directory. Sync this
directory with the /var/www/html folder in VM, by modifying this line in vagrantfile:
with this: