- Download and install VirtualBox
- Download and install Vagrant
- Clone this repository and change in its directory:
- Run
git clone https://github.com/RafaelKa/Vagrant-for-TYPO3-Flow.git
- Run
cd Vagrant-for-TYPO3-Flow
- Install Vagrant plugin to manage hostname for this project automatically:
- Run
vagrant plugin install vagrant-hostmanager
- Run
vagrant up
- will ask password on Unix-like OS. This is for write acces on
/etc/hosts
file byvagrant-hostmanager
. - Notice for Windows users: missing VBoxAdpNet.sys
- Access to a shell by running following command:
- Run
vagrant ssh
- Login as typo3 user in a shell and run Flow commands
- Run
sudo su - typo3
- Run
./flow help
and other flow commands
- Setup your IDE for using project as
project on remote host
as described in Setup your IDE chapter. - Setup Database as described in Flow Quickstart Documentation chapter.
- use provided PhpMyAdmin to create user and database
- or make it with
mysql -u root -p'' ...
command inside your Vagrant boxes shell. Userroot
has no password!
File
->New Project from Existing Files...
- Choose
Web server is on remote host, files are accessible via FTP/SFTP/FTPS.
- Please specify project name and local path to download project files to.:
- Project name:
typo3-flow.dev
- (Optional) Project local path: You can point in this vagrant box directory under
projects/typo3-flow.dev
. - Click
next
- Choose
Add new remote server
and clicknext
- Specify parameters for a new server.:
- Name:
Vagrant Box for TYPO3-Flow
- Type:
SFTP
- SFTP host:
typo3-flow.dev
- Port:
22
- Root path:
/var/www/projects/
- User name:
typo3
- Auth type:
Password
- Password:
typo3
- Web server root URL:
http://typo3-flow.dev
- Check
Don't check HTTP conection to server
and clicknext
- Specify root folder on the remote server:
- Choose
typo3-flow.dev
folder and click onProject Root
button on the top of current window - Click
next
and thenFinish
- PhpStorm will download all TYPO3 Flow files in your project root. This can take a while(<3 minutes)
- Automatic upload on save:
- Choose
Tools
->Deployment
->Automatic Upload
- Go with your web browser to typo3-flow.dev (if it does not work on Windows check hosts on Windows)
- Follow the on-screen or Quick Start Guide for TYPO3 Flow instructions.
File
->New Project from Existing Files...
- Choose
Web server is on remote host, files are accessible via FTP/SFTP/FTPS.
- Specify project name (and local path if needed) and click
next
- Choose
Use existing server
or go to steps 4 and 5 from Use default project
- Choose
Vagrant Box for TYPO3-Flow
which was created in steps 4 and 5 from Use default project - Click
next
- Specify root folder on the remote server:
- Right click on
Vagrant Box for TYPO3-Flow (typo3-flow.dev/var/www/projects/)
->Create Folder...
- Enter folder name:
{lower-case-projectname[.dev]}
- Click
OK
- Choose created folder and click on
Project Root
button on the top of current window - Click
next
andFinish
- Automatic upload on save:
- Choose
Tools
->Deployment
->Automatic Upload
- Choose
- Install TYPO3 Flow with composer inside a Vagrant box:
- Click
Tools
->Start SSH session
- Choose
Vagrant Box for TYPO3-Flow
- Run
composer create-project --dev --keep-vcs typo3/flow-base-distribution {lower-case-projectname[.dev]}
- Run other commands f.x.
composer require ...
- Download project files in projects root folder:
- Click
Tools
->Deployment
->Download from default server
or right click on the root directory in Project window from PhpStorm and chooseDeployment
->Download from ......
- PhpStorm will download all TYPO3 Flow files in your project root. This can take a while(<3 minutes)
- Add
192.168.144.100 {lower-case-projectname[.dev]}
line in /etc/hosts (Windows: %SystemRoot%\system32\drivers\etc\hosts) file.
- addrsees:
- each reachable address of current vagrant box + /tools/phpmyadmin
- http://typo3-flow.dev/tools/phpmyadmin
- http://192.168.144.100/tools/phpmyadmin
- http://{lower-case-projectname[.dev]}/tools/phpmyadmin
- login
root
no password
If you want to run multiple machines at same time, you can do that but you must customize following things:
- assign own IP address and hostname for each Vagrant box:
- change
192.168.144.100
andtypo3-flow.dev
inVagrantfile
- rename typo3-flow.dev folder to the in the previous step defined hostname f.x. {lower-case-projectname[.dev]}
- change
WIP: You can use settings.yaml to enable and disable installation and auto start from services like MySQL, Apache, NginX, etc.
On vagrant up
you will be asked for VBoxAdpNet.sys
file. You must point in VirtualBox window on C:\Program Files\Oracle\VirtualBox\drivers\network\netadp\VBoxNetAdp.sys
Vagrants plugin vagrant-hostmanager
seems to get troubles with hosts on Windows host machine.
Therefore most likely on Windows machines you must add an entry manually in hosts
file.
- Run Editor as administrator and navigate to
%SystemRoot%\system32\drivers\etc
(alwaysC:\Windows\System32\drivers\etc
) folder - Choose
show all files
- Choose
hosts
file and clickopen
. - Add
192.168.144.100 {lower-case-projectname[.dev]}
line at the end of file. - Click save and close Editor
- Now you can request
{lower-case-projectname[.dev]}
ind your web browser